+ Reply to Thread
Results 1 to 2 of 2

Vlookup - Returning value from Merge Cell

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Vlookup - Returning value from Merge Cell

    Hello Excel Experts,

    The objective is to return a vlookup value from a merge cell. Column A contains the "lookup_value", and Column B is the value that needs to return. Please note that Column B MAY or MAY NOT be merged. If it's Merged, I will have a '[Merged]' written beside the value, and the following row(s) will have just have the word '[Merged with x]' where x is the row that it merges with. Below is a simple data.

    Col A Col B
    1 ABC Red
    2 BCD White
    3 CDE Yellow [Merged]
    4 DEF [Merged with 3]
    5 EFG [Merged with 3]


    So assuming if I were to do a vlookup, I would like to return the value of Column B with the lookup_value of row 4 and 5 (DEF and EFG) to return as "Yellow"

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Vlookup - Returning value from Merge Cell

    Since you've underlined "expert", then let me interject that merging cells in this manner is a no-no in a database or lookup table, it's not something an expert would do. Merging cells is for "prettying up" final reports and outputs, not for raw / reference data that needs to be robust.

    So, your true database would have yellow in B4 and B5, too. Now, all normal lookup functions work correctly without the need of magic.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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