+ Reply to Thread
Results 1 to 2 of 2

Putting the results of a vlookup into a cell's comment

  1. #1
    Registered User
    Join Date
    02-10-2012
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Putting the results of a vlookup into a cell's comment

    I have two tables, a summary table and a documents_list table. The summary table does a lookup on the documents_list table to determine the latest version of the document (several exist), and then returns the document name, version number, date and author into the cell. The reason for the Concatenation, is that the lookup is done on the services ([@Services]), the type (D$1) and whether the document is the latest version ('Yes')The formula is as follows and works fine.

    =IF(ISNA(VLOOKUP(CONCATENATE([@Services],D$1,"Yes"),Lookup_Data,2,FALSE)),
    "",
    CONCATENATE(VLOOKUP(CONCATENATE([@Services],D$1,"Yes"),Lookup_Data,2,FALSE),CHAR(10),CHAR(13),
    TEXT(VLOOKUP(CONCATENATE([@Services],D$1,"Yes"),Lookup_Data,5,FALSE),"dd-mmm-yy"),", ",
    VLOOKUP(CONCATENATE([@Services],D$1,"Yes"),Lookup_Data,4,FALSE),CHAR(10),CHAR(13),
    VLOOKUP(CONCATENATE([@Services],D$1,"Yes"),Lookup_Data,6,FALSE),CHAR(10),CHAR(13),
    VLOOKUP(CONCATENATE([@Services],D$1,"Yes"),Lookup_Data,21,FALSE)))

    I would like to do a vlookup on the "notes' field from the documents_list table and have the contents of the cell populate the comment for that cell in the summary table.

    The vlookup formula to get the "notes" field from the documents_list table would is:

    =VLOOKUP(CONCATENATE([@Services],D$1,"Yes"),Lookup_Data,22,FALSE)

    Not all the cells are populated, so I only want comments on cells with content, and ONLY want a comment, if something exists in the notes field.

    Can someone help with the VBA code to do this?

    Trish

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,006

    Re: Putting the results of a vlookup into a cell's comment

    Trish,

    Hard to figure this out without an example spreadsheet. I can tell you that this line of code puts a comment into a cell, you could use a variable in vba, assign it the note value to it, then if not blank ("") make it a comment for the cell in question.

    Please Login or Register  to view this content.
    hope it helps get you started at least.

    Arkadi
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

+ 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. Replies: 1
    Last Post: 02-14-2012, 05:45 PM
  2. Putting text at the end of formula results
    By stephens in forum Excel General
    Replies: 8
    Last Post: 01-08-2010, 04:07 PM
  3. Putting results on a single line
    By threedeesix in forum Excel General
    Replies: 1
    Last Post: 12-01-2006, 08:07 PM
  4. [SOLVED] Vlookup while pulling a cell color and comment
    By wendy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2006, 01:15 PM
  5. Separating Text and putting the results elsewhere
    By Immobius in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-24-2005, 08:16 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