Lookup??

pepjr

New Member
Joined
Aug 1, 2005
Messages
15
Hi, Stuck....

I have 4 rows of data (going across lots of columns). Top row is a series of dates. Row's 2-4 have a set of values in there (just names, each appearing once).

Want to find the cell (in row 2-3) with a given name in, then return the date (from the top row of that column).

Can anyone help?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try this...

=INDEX($C$1:$M$1,1,MATCH(A1,$C$2:$M$2,0))

Name to match in A1.
Dates in C1 to M1 (expand as necessary)
Names to search thru in C2 thru M2 (expand as necessary.)
 
Upvote 0
Possible way:

=INDEX($A$1:$F$1,MIN(IF($A$2:$F$4=A6,COLUMN($A$2:$F$4)-COLUMN($A$1)+1)))

Needs CTRL-SHIFT-ENTER to commit to cell.
 
Upvote 0
Actually that doesnt work if the value isnt found. This is better:

=IF(COUNTIF($A$2:$F$4,$A$6)>0,INDEX($A$1:$F$1,MIN(IF($A$2:$F$4=$A$6,COLUMN($A$2:$F$4)-COLUMN($A$1)+1))),"Not Found")
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top