+ Reply to Thread
Results 1 to 4 of 4

lookup value when referencing a merged cell

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2010
    Posts
    32

    lookup value when referencing a merged cell

    Hello,

    In my current spreadsheet I have several lookup functions that refer to a merged cell for the lookup value. Ideally, I'd like to be able to drag and drop the lookup function across all of the values I need to be looked up. The problem is, since the lookup value parameter in the function is referring to a merged cell, the function only works for the first cell of every merged cell. I could solve this by making the lookup value and absolute reference but this is not preferred since I drag and drop the lookup function over several rows/columns. I've attached a spreadsheet illustrating my problem with my current preferred workaround. I was hoping there was a better solution because this can also get cumbersome and easy to make a mistake in the work I do. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: lookup vale when referencing a merged cell

    hi lwfilp, will this help?

    =HLOOKUP(IF(E3="",D3,E3),$B$2:$C$4,IF(E3="",3,2),FALSE)

    then you dont even need the 2 or 3

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    09-13-2012
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: lookup vale when referencing a merged cell

    Yes, that will work for some instances I run into this problem. However, in most cases the number of merged cells ranges from 2 to 6 so that particular test for the blank cell wouldn't work. Also, the lookup function that I actually use is more complex than that (it uses index and match to lookup values in a nested table). I am not sure if that will work or not at this moment. I don't even remember the whole function off hand. Will have to check when I get to work. I can post a better example in the next few days.

    As for the 2 and 3, I am not worried about that part. I would prefer to leave that part a variable above the header row because I often change those values for different case studies.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: lookup vale when referencing a merged cell

    Pl see the attached file with formula.
    Attached Files Attached Files

+ 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