+ Reply to Thread
Results 1 to 5 of 5

Find and Match Text in Column Return Adjacent Cell

  1. #1
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Find and Match Text in Column Return Adjacent Cell

    I have a list of products that I create for a job in cells B7:B17. There is a box of established pricing on the same worksheet in cells A29:A39. I would like to create a macro that can scan through the list of products and match them with their associated price found in the pricing box in A29:A39 and copy it to a cell in a different row but same column as the product(cell H7:H17). The products will vary however it will always match exactly what is in the pricing box.

    I am very new to VBA's and would appreciate any kind of assistance. I can provide a sample worksheet if it helps.

    Thanks

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Find and Match Text in Column Return Adjacent Cell

    You can do it quite easily with a formula - why do you think you need a macro?

    Anyway, it would be a good idea to post a sample workbook.

    Pete

  3. #3
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find and Match Text in Column Return Adjacent Cell

    I tried searching for functions that might help me but couldnt find anything, I though a macro would be the next thing. Even better if it can be done with a formula!
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Find and Match Text in Column Return Adjacent Cell

    Put this in G7:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and this in I7:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    then copy down. If you have no data in column B you will get #N/A, but you can remove that by doing this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    (I've only shown it for the second formula).

    By the way, it's not a good idea to use merged cells.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    07-11-2012
    Location
    Hamilton, New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find and Match Text in Column Return Adjacent Cell

    Thanks Pete! I've used VLOOKUP before so I dont know why I didnt think it would work. But it did, thank you very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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