+ Reply to Thread
Results 1 to 9 of 9

Look Up Column & Row

  1. #1
    Registered User
    Join Date
    10-26-2010
    Location
    USA
    MS-Off Ver
    Microsoft Office 2010
    Posts
    32

    Look Up Column & Row

    I can not seem to find the right steps to look up a row and a column in Excel. For example, I am trying to look up a Column of unique Note Numbers with a row of specific attributes to a another like database in excel. Please see the attachment for a very easy understanding of the issue.
    Attached Files Attached Files

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

    Re: Look Up Column & Row

    Do you mean, in L5:

    =INDEX(C$5:C$12,MATCH(1,INDEX(($B$5:$B$12=$K5)*($E$5:$E$12=$N5),0),0))

    copied to next column

    If match of both items in same row not found, you get #N/A error.
    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
    Registered User
    Join Date
    10-26-2010
    Location
    USA
    MS-Off Ver
    Microsoft Office 2010
    Posts
    32

    Re: Look Up Column & Row

    Thanks so much for your help. I apologize as I might of explained the issue wrong. I have updated the excel attachment and below is what I am trying to accomplish.

    I want to take my New Database and look up the Retail # 20 and the corresponding School in my Original Database and produce a result. In this case the End Result was Bob after Excel looked up the Retail Number of 20 and the corresponding Name. I am just trying to take it a step farther versus using a Vlookup and aligning it was index_num and would like to look up the row & column
    Attached Files Attached Files

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

    Re: Look Up Column & Row

    In L5, then, try:

    =VLOOKUP($K5,$B$5:$E$12,COLUMNS($A$1:B$1),0)

    copied across the matrix.

  5. #5
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Look Up Column & Row

    Dear NVBC - or anyone who may be able to answer........

    In an attempt to learn and develop my skills I often come onto this site and DL practice/read q and a's.

    On this occassion - i dont understand the last section of this formula.. =VLOOKUP($K5,$B$5:$E$12,COLUMNS($A$1:B$1),0) which is $A$1:B$1),0).

    On the example provided, the cells a1 and b1 are blank........ am i missing something?

    Thanks
    Darren
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

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

    Re: Look Up Column & Row

    COLUMNS($A$1:B$1) simply results in a number.. the number of columns within the range Identified.

    This is a technique used to replace the Index Column Number hard coding, so that you can copy the formula across and have it automatically increase the column index number for the vlookup automatically.

    So COLUMNS($A$1:B$1) results in 2 (column 2)

    when you copy across this over to next columns it becomes COLUMNS($A$1:C$1) which results in 3 so it will now look in 3rd column.. and so on.

  7. #7
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Look Up Column & Row

    i tested it and have answered my own q!! the cols, in this case a and b, donthave to be empty! Thanks for your time
    whoa, boy,, am i gonna use that!! i needed that last week and last month!!

    In fact, this is a nougat!

    In hommage to Columbo... one more Q, same subject, if you dont mind. Does the first Col always have to be empty as in this case? (Col A)

    Thanks Dude. Have you been to Red Bay - Canada?
    Last edited by Blake 7; 10-26-2010 at 05:49 PM. Reason: i tested it and have answered my own q!! the cols, in this case a and b, donthave to be empty! Thanks for your time

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

    Re: Look Up Column & Row

    the Columns() function only counts the number of columns between the specified range. It does not matter if they are empty or not... It has nothing to do with the data in the columns.

    See the Column and Columns functions (Also Row and Rows) in Excel help for more.

  9. #9
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Look Up Column & Row

    Thanks alot.
    All the best
    Darren

+ 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