Find Value in range

nav1701

Board Regular
Joined
Jan 19, 2006
Messages
87
Hi,

I need to do a lookup to bring back a value with 2 sets of crieria.

the table I'm searching against has headings across the top and unique values which need to be searched against in the left hand column.

I the sheet I am in, I need to seach for a value in cell B4 against the values listed in the second sheet in the left hand column, then I need to seach against the headings to match the value in F2. Is this possible?

Any help you could offer would be great.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
This should work
=INDEX(Sheet2!$A$1:$Z100, MATCH(Sheet2!B4, Sheet1!$A$1:$A$100,0), MATCH(Sheet2!F2, Sheet1!$A$1:$Z$1,0))
 
Upvote 0
Thanks, almost there, what if the value in the furtherest left column in the second sheet is listed more than once?
 
Upvote 0
It worked perfectly fine, but I need to do a similar thing in another spreadsheet, but with this one the values in the left hand column can come up more than once.
 
Upvote 0
The formula will return the value from the first row of Sheet1!A:A that matches Sheet2!B4.
If B4 has a Validation list, it will NOT distiquish between the first and second "Smith" in the list.
To get around that would involve VBA.
 
Upvote 0
Try to use below array formula:

1) Input below formula:
= INDEX(Sheet2!$A$1:$Z100, LARGE(IF((Sheet1!$B$1:$B$100=Sheet2!$B$4),ROW(Sheet1!$B$1:$B$100),0),ROW(A1)),MATCH(Sheet2!$F$2, Sheet1!$A$1:$Z$1,0))

2) Then press ctrl + shift + enter

3) Then drag drown to cell below

All the cells Matched in the Left Column will been shown.

No existing data to try may get error, see if it what u need ,thx.
 
Upvote 0

Forum statistics

Threads
1,222,246
Messages
6,164,802
Members
451,917
Latest member
WEB78

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