+ Reply to Thread
Results 1 to 5 of 5

Automatic creation of comment text based on a lookup value in another cell

  1. #1
    Registered User
    Join Date
    03-12-2021
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    3

    Automatic creation of comment text based on a lookup value in another cell

    Hello all,

    I am Hans van't Hof , new here and very little experience in VBA for Excel.

    I would like to get some help on the below issue.

    I have an excel file that gets data imported from another application.
    The file has 2 sheets with a table on each of them.
    First sheet:
    Table 1.gif

    Second sheet:
    Table 2.gif

    This excel file is used to visualize the status of an User Acceptance Test.
    On sheet 1 I have listed a few Business Scenario's. Each scenario contains 1 or more steps.
    The fields contain a test ID number.

    On the second sheet I have a table showing the test ID number and a root cause. This table only contains data for Test Cases ID that failed.

    What I am looking for is a VBA macro that can automatically populate a cell comment on the first sheet if a match is found based on Test Case ID in the second table. The comment should contain the root cause from the cell in the second table.

    E.g.
    Cell E2 (17859) should get a comment created based on matching cell in 2nd sheet, content in this case "System down"
    Cell D4 (17460) should get a comment created based on matching cell in 2nd sheet, content in this case "User Access revoked"
    Etc. etc

    If no matching entry can be found in the second table based on Test Case ID number, then no comment should be created.

    I hope I described it in a good enough way. I have attached an example file (as per above).

    Thanks all in advance for your help.
    Best regards
    /Hans
    Attached Files Attached Files

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Automatic creation of comment text based on a lookup value in another cell

    Hi Hans & welcome to the forum

    Try below code ..
    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Registered User
    Join Date
    03-12-2021
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Automatic creation of comment text based on a lookup value in another cell

    Thanks so much. You have saved my day!
    Much appreciated.

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Automatic creation of comment text based on a lookup value in another cell

    Glad to help

    If that takes care of your question, please take a moment & mark this thread as [SOLVED] from the Thread Tools above your first post. Also, since you're new to the forum, you can thank those who have helped by clicking the little star icon under their usernames to * Add Reputation

  5. #5
    Registered User
    Join Date
    03-12-2021
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Automatic creation of comment text based on a lookup value in another cell

    Thanks, done now

+ 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. [SOLVED] automatic lookup data based on two information cell
    By oeyandyprawira in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2018, 10:40 PM
  2. Auto comment based on cell text
    By Luke81 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2017, 02:05 AM
  3. Replies: 3
    Last Post: 03-28-2014, 07:04 AM
  4. Automatic code creation based on two inputs
    By snezana in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2013, 03:35 AM
  5. Add timestamp to comment upon comment creation (Excel 2007)
    By Shadyhaxx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2013, 12:58 PM
  6. Cell's text / comment (no comment )
    By Marianus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-22-2013, 06:05 AM
  7. Automatic navigation based on cell text value
    By bluegrassstateworker in forum Excel General
    Replies: 2
    Last Post: 07-28-2006, 09:50 AM

Tags for this Thread

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