vlookup with wildcards

Patrunjel

New Member
Joined
Feb 10, 2012
Messages
9
Hi,

I am trying to do a vlookup for a number that has one decimal. The number will always be "5" but the decimals can be from 0-9 (e.g. 5.2, 5.0, 5.9)
I tried to concatenate vlookup(5&".'&"*",table,4,false) but it doesn't work.
I cannot vlookup a cell (such as A3 or B4), bc I am looking for the first occurance of a "5" in a list.

Your expert help is greatly appreciated!

Thank you.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi,

I am trying to do a vlookup for a number that has one decimal. The number will always be "5" but the decimals can be from 0-9 (e.g. 5.2, 5.0, 5.9)
I tried to concatenate vlookup(5&".'&"*",table,4,false) but it doesn't work.
I cannot vlookup a cell (such as A3 or B4), bc I am looking for the first occurance of a "5" in a list.

Your expert help is greatly appreciated!

Thank you.

Two solution.
One based on vidar example:

Excel 2010
EFG
1
25.25.2
355.1
45
Sheet10
Cell Formulas
RangeFormula
E2{=INDEX(G2:G4,MATCH(5,ROUNDDOWN($G$2:$G$4,0),0))}
E3{=VLOOKUP(5,ROUNDDOWN($G$2:$G$4,0),1,0)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you Vidar, but I get an error (#value). I don't thing rounddown works with an array. Or perhaps I'm wrong.

I'm sorry, forgot to tell you that you need to hit Ctrl+Shift+Enter since it is an array formula.
Vidar
 
Upvote 0
Why not just use a VLOOKUP with range_lookup set to TRUE?

If it can't find the value exactly (e.g. 5.8) then it'll use the largest value which is less than it (in this case 5).

=VLOOKUP(A1,LookupTable,2,TRUE)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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