Lookup vertically

H

hugh

In cell C25 I would like to place a formula that finds the closest cell
UP in Column A that contains the word "Arizona", and then returns the
value in column B for that row. For example: if A19 contains "Arizona"
and B19 contains 34.... and A14 contains "Arizona" and B14 contains 38,
I would like the formula in cell C25 to return 34--because row 19 is
closer to row 25 than row 14 is to row 25. (assume the other rows in
column A contain names of different states). Thanks very much to whoever
can help!!!

** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Software!
http://www.ozgrid.com/Services/excel-software-categories.htm **
 
J

Jerry W. Lewis

=INDIRECT("B"&MAX(IF(A$1:A24="Arizona",ROW(A$1:A24))))

array entered (Ctrl-Shift-Enter)

Jerry
 
D

Dave Peterson

Either unmerge C25 (format|cells|alignment tab)
or put the formula in a different cell.

If you must have C25 merged, you can use a different (out of the way cell) to
determine the value (z99?), then use the formula =z99 in cell c25.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top