+ Reply to Thread
Results 1 to 15 of 15

Can Lookup or Index be used to reference to different cells?

  1. #1
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Can Lookup or Index be used to reference to different cells?

    Can they be used to reference data based on data inserted into more than one cell? I have attached an example as its kind of confusing to explain.
    Attached Files Attached Files
    Last edited by mrgillus; 07-14-2009 at 10:15 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Lookup or Index be used to reference to different cells?

    Try:

    =INDEX($J$2:$L$8,1,MATCH(A1,Color,0))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Can Lookup or Index be used to reference to different cells?

    Thanks for the prompt reply. I apologize as I may not have been too clear on the result I was trying to get. Basically I want to try and reference to either table depending on which drop down is used. However, I want them both to go to the same cell. In other words it would be like there are two different index formulas for A3... I'm kind of thinking this would not be possible as it will create conflicting data..

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Lookup or Index be used to reference to different cells?

    So is based on priority? For example, if A1 has a selection, then use that, or if A1 is blank and A2 has a selection go with that?

    I.E. How do you know which Data table to use?

  5. #5
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Can Lookup or Index be used to reference to different cells?

    Ideally if the first one is selected then then you could chose in the second box which detail to show. I will upload an updated version. And, on this new version is there a way for data validation to omit the blanks from the drop down list in A2?? Thanks again for your help!
    Attached Files Attached Files
    Last edited by mrgillus; 07-14-2009 at 09:14 AM. Reason: Sentence structure

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Lookup or Index be used to reference to different cells?

    I am not sure still what you are trying to do...

    Can you specify exactly what you want to happen?

    What is supposed to be in A3 and based on exactly what?

  7. #7
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Can Lookup or Index be used to reference to different cells?

    Once again I apologize as I know this is somewhat confusing. The scenario is this: I want a user to beable to select a something from A1 first. Lets say that want to know something about Peas then they chose peas from the drop down list in A1. Now that peas has been selected they can chose from the next drop down in A2 whether to display the Desc or the Type. Then in the merged box A3 it will show "Red in color" if from the drop down in A2 they chose "Desc" and in A3 it will show "Fruit" if they have chosen "Type" from the drop down in A2.

    Let me know if that helps..

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Lookup or Index be used to reference to different cells?

    Ok, I understand now, I think...

    First, it is best not to work with merged cells... this is what is making your data validation include blanks...

    See if the attached is suitable...

    Formula in A3:

    =INDEX($J$2:$L$3,MATCH(A2,$I$2:$I$3,0),MATCH(A1,Color,0))

    ... If you must have it as merged cells, then you should enter the list manually in Data Validation|List as: Type,Desc

    Then use formula in A3:

    =INDEX($J$2:$L$8,MATCH(A2,$I$2:$I$8,0),MATCH(A1,Color,0))
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Can Lookup or Index be used to reference to different cells?

    That works fantastic! I actually stumbled upon that method just before I got your response back. Now I am going to one-up it though. The form that I'm actually working on has more text than can fit into one cell.. In other words let's say Type also has another column called Type(continued) and I want to beable to bring that into the Cell A4 just below A3.. I have attached an update to the doc you just sent me that better demonstrates..

    Thanks
    Attached Files Attached Files

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Lookup or Index be used to reference to different cells?

    Try:

    =IF(A2="Type",INDEX($J$4:$L$4,MATCH(A1,Color,0)),"")

    in A4

  11. #11
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Can Lookup or Index be used to reference to different cells?

    That works.. Give me a few minutes to play with this.. I think I still may have to make this more complicated yet.. I think I may have to do the same thing with the Desc tab as I did with the Type tab.. e.g. there will need to be a "Desc (Continued)", which I think will cause this to conflict.. Thanks again for all your help.. I'll get back with you in a few to let you know..

  12. #12
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Can Lookup or Index be used to reference to different cells?

    OK NBVC, I think I have it.. I am just furthering out your If statement to show if false then it indexes again based on the "Desc (Continued)" row.. It seems to work great. Thanks for all your help!

    Also I am attaching the copy of what I did for others to see..

  13. #13
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Lookup or Index be used to reference to different cells?

    In case that is what you want.. check the attached... it caters for both Desc and Type with it's "continued"...
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Can Lookup or Index be used to reference to different cells?

    Forgot to upload file.. here it is
    Attached Files Attached Files

  15. #15
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Can Lookup or Index be used to reference to different cells?

    See my last example, which would allow you to better cater to more input values (in case you have more than just Type, Desc....

+ 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