+ Reply to Thread
Results 1 to 7 of 7

Copy comment and image vlookup

  1. #1
    Registered User
    Join Date
    07-16-2022
    Location
    Earth
    MS-Off Ver
    2016
    Posts
    10

    Copy comment and image vlookup

    Good day all.
    I found this template somewhere on the net.
    Is it possible to copy the comment and image?
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Copy comment and image vlookup

    I don't think an UDF can return image as comment.
    Instead of UDF, I would suggest using worksheet_Change event to trigger change from column E, then copy (value + comment) matching cell in to column F
    Put below code in worksheet module (Right-click tab name, "view code")

    PHP Code: 
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim xReturn As Variant
    Dim ycell 
    As Rangerng As Range
    If Intersect(TargetRange("E5:E" Cells(Rows.Count"E").End(xlUp).Row)) Is Nothing Then Exit Sub
        Set rng 
    Range("B5:C" Cells(Rows.Count"B").End(xlUp).Row)
        
    xReturn Application.Match(Targetrng.Columns(1), 0)
        If 
    IsError(xReturnThen
            With Target
    .Offset(, 1)
                .
    Comment.Delete
                
    .Value "Not Found"
            
    End With
        
    Else
            
    Set ycell rng.Columns(2).Cells(1)(xReturn)
            
    ycell.Copy Destination:=Target.Offset(, 1)
        
    End If
    End Sub 
    Quang PT

  3. #3
    Registered User
    Join Date
    07-16-2022
    Location
    Earth
    MS-Off Ver
    2016
    Posts
    10

    Re: Copy comment and image vlookup

    I am getting this error when I tried to delete value in E, why is that?

    Please Login or Register  to view this content.

    Say for instance I want to change the set rng from another sheet (L2), how do I do that?
    Last edited by basicexcel010; 07-26-2022 at 08:47 PM.

  4. #4
    Registered User
    Join Date
    07-16-2022
    Location
    Earth
    MS-Off Ver
    2016
    Posts
    10

    Re: Copy comment and image vlookup

    Anyone can help me out please?

  5. #5
    Registered User
    Join Date
    07-16-2022
    Location
    Earth
    MS-Off Ver
    2016
    Posts
    10

    Re: Copy comment and image vlookup

    Good day all.

    I am still getting error whenever I tried to delete values in E, why is that?
    Please Login or Register  to view this content.
    If I want to change the set rng from another sheet (L2), how do I do that?

  6. #6
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,223

    Re: Copy comment and image vlookup

    Maybe start from the beginning. Explain to us step by step WHAT you want to achieve. And we may tell you HOW to achieve it.
    The lack of a satisfactory answer so far may be because we don't understand your problem.


    Artik

  7. #7
    Registered User
    Join Date
    07-16-2022
    Location
    Earth
    MS-Off Ver
    2016
    Posts
    10

    Re: Copy comment and image vlookup

    Quote Originally Posted by basicexcel010 View Post
    Good day all.

    I am still getting error whenever I tried to delete values in E, why is that?
    Please Login or Register  to view this content.
    If I want to change the set rng from another sheet (L2), how do I do that?
    Good day gurus.
    Anyone can help me out with the delete error and change set rng from another sheet?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Comment Box - Rotate Image
    By forestview in forum Excel General
    Replies: 1
    Last Post: 07-20-2020, 06:31 AM
  2. [SOLVED] add an image to a comment box through link
    By chriswrcg in forum Excel General
    Replies: 1
    Last Post: 02-16-2019, 05:32 AM
  3. Lookup for image/comment
    By exceleratevba in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2018, 03:21 PM
  4. Vlookup comment with image
    By exceleratevba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2018, 01:47 PM
  5. Comment-image in a cell
    By gabonik in forum Excel General
    Replies: 2
    Last Post: 06-24-2017, 05:49 AM
  6. Copy contents of multiple comment boxes and paste in a single comment box
    By xxJaRxx in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-14-2014, 12:39 PM
  7. [SOLVED] how do I insert image in a comment?
    By t23augusto in forum Excel General
    Replies: 1
    Last Post: 07-30-2005, 08:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1