How to perform reverse search (Bottom to top)

mk5584

New Member
Joined
Jan 23, 2014
Messages
8
Hi,

Is it possible to search in a array from bottom cell to top cell (Vlookup does from top to bottom), In the below table I need a result of "Shaft" for input 3, whereas vlookup will give "Crank shaft" as a result

[TABLE="width: 152"]
<tbody>[TR]
[TD]Level[/TD]
[TD]Part[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Truck[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Engine[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Crank Shaft[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Cam Shaft[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Cylinder[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Piston[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Piston Rod[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Transmission[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Gears[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Case[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Shaft[/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Assumed your data in ranges A1:B12, based on your table, and input criteria in Cell D2 (ie: 3)
Put this in Cell in E2 and copied down:

=INDEX(B:B,MAX((A2:A12=D2)*ROW(A2:A12)))

Array Formula --> hit CTRL-SHIFT-ENTER button together


Azumi
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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