lookups and match return row number

rki1966

Active Member
Joined
Feb 1, 2004
Messages
351
I am trying to find the easiest way to right a formula that will check to see if the first id are in the list on another sheet. then return the row number.

DATA Sheet
id1 id2 name row
345 des desc 1
452 dre dref 2
546 efr efrg 3

report sheet

id1 id2 news amount
345 des help 45.20
777 dre bren 25.20
222 ndr new 62.50


the first row would match on id1 and return row 1, the second row would match on id2 so would return row 2, the third row is not found so 0.

Thanks for your help
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

sssb2000

Well-known Member
Joined
Aug 17, 2004
Messages
1,169
if your id1 is in A1, your Id1 is in C1, C2, C3 and your other stuff is in the rang D1:F3 then:

=if(isna(vlookup($A$1,$C$1:$F$3,1,false),"not in there",row()))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,895
Messages
5,766,978
Members
425,392
Latest member
Booknerd

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
Top