look up with duplicates

sabilabry

New Member
Joined
Aug 26, 2011
Messages
3
hi everyone,

i need to look up for the last data that match with my look up value but the problem is it has duplicates.. it goes something like this.

Lets say that A1:B7 houses the sample data:

A B
400 HE
23 MS
98 PS
450 HE
89 HE
300 PS

my look up value lets say is "HE",.. i want the result to be "89"..

Pls help me for the solution.. thanks alot..Godbless..

Attention Mr. Aladin,
would you mind giving me your email address or if you can allow me to ask you directly? thanks.



 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
hi everyone,

i need to look up for the last data that match with my look up value but the problem is it has duplicates.. it goes something like this.

Lets say that A1:B7 houses the sample data:

A B
400 HE
23 MS
98 PS
450 HE
89 HE
300 PS

my look up value lets say is "HE",.. i want the result to be "89"..

Pls help me for the solution.. thanks alot..Godbless..
Try one of these...

=LOOKUP(2,1/(B1:B6="HE"),A1:A6)

This one is an array formula**:

=INDEX(A1:A6,MATCH(2,IF(B1:B6="HE",1)))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Upvote 0
Maybe an array-formula like

=INDEX($A$1:$A$100,MAX(IF($B$1:$B$100="HE",ROW($B$1:$B$100)-ROW($B$1)+1)))

confirmed with Ctrl+Shift+Enter

M.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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