vlookup- approximate match

drewbny

Board Regular
Joined
Jan 16, 2011
Messages
98
I tried using vlookup with approximate match and my vlookups werent working. I have to lookup a column which is a concatenate of two other columns. does vlookups on approximate match not work with concatenates?
 
The IF statement that I have which has the ISNA is the following

=IF($AT$4>0,IF(ISNA(INDEX(projsls,(MATCH($B18,Prjsheet,0)))),0,(INDEX(projsls,(MATCH($B18,Prjsheet,0))))/1000),IF(ISNA(INDEX(ladder20,(MATCH($L18,Ladders,0)))),0,(INDEX(ladder20,(MATCH($L18,Ladders,0))))))

projsls is a named range
Prjsheet is a named range
Ladders is a named range
Ladder 20 is a named range

Originally I wrote a version of this formula as a vlookup but i switched my formulas to index match since i could set up a named range that only looked up one column as opposed to my vlookup formula that looked up an entire worksheet in my named range. By using smaller named ranges, will this make my workbook calculate faster?

Define BigNum as referring to:
Rich (BB code):
=9.99999999999999E+307

Then invoke:
Rich (BB code):
=IF($AT$4>0,
   LOOKUP(BigNum,CHOOSE({1,2},0,INDEX(projsls,MATCH($B18,Prjsheet,0))/1000)),
   LOOKUP(BigNum,CHOOSE({1,2},0,INDEX(ladder20,MATCH($L18,Ladders,0)))))
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Why would I have to setup Big Num? and how does the choose command work? ALso I saw that you used lookup. I cannot sort my data so lookup will still work?
 
Upvote 0
Why would I have to setup Big Num? and how does the choose command work? ALso I saw that you used lookup. I cannot sort my data so lookup will still work?

If you look at the set up closely, it avoids computing the same thing twice.
Also, LOOKUP as used here is a different matter: It does not require any sorting.
 
Upvote 0
If you look at the set up closely, it avoids computing the same thing twice.
Also, LOOKUP as used here is a different matter: It does not require any sorting.

Would this formula calculate extremely fast? is this faster than using Countif to replace the ISNA?
 
Upvote 0
Is this the fastest way to write my formula? i used index match so my named ranges are just one column long. WHen i had my formulas as vlookups, i had my named ranges are 50 columns long, and then i would vlookup the column i need. IN this case , is using index match faster?
 
Upvote 0
Is this the fastest way to write my formula? i used index match so my named ranges are just one column long. WHen i had my formulas as vlookups, i had my named ranges are 50 columns long, and then i would vlookup the column i need. IN this case , is using index match faster?

Yes, Index/Match is faster...
 
Upvote 0
Why would I have to setup Big Num?
You don't have to.

All you need for the lookup_value is a number that's guaranteed to be greater than the number returned by either of these expressions:

INDEX(projsls,MATCH($B18,Prjsheet,0))/1000

INDEX(ladder20,MATCH($L18,Ladders,0))

For example, if you're dealing with bowling scores then you know the maximum possible score is 300. So, if the value returned by either of those expressions can not possibly be greater than 300 then the lookup_value simply needs to be greater than 300. Like 301.

I typically use 1E100 which is scientific notation for 1 follwed by 100 zeros. That's a really big number and I don't even have to remember how many 9's to enter!

=LOOKUP(301,.......
=LOOKUP(1E100,.......
=LOOKUP(9.99999999999999E+307...
 
Upvote 0
What does defining Big Number do?

It is used as lookup value in

LOOKUP(BigNum,Reference)

This returns the last numeric value from Reference:

Example:

A1: 20
A2: 3

LOOKUP(BigNum,A1:A2)

returns 3.

In

LOOKUP(BigNum,CHOOSE({1,2},0,INDEX(...,MATCH(...)))

CHOOSE creates a two-item array like in:

{0,45}

{0,#N/A}

Such fed LOOKUP yields: 45 and 0, respectively.

The way LOOKUP works with the BigNum is explained in post #7 of:

http://www.mrexcel.com/forum/showthread.php?t=310278

BigNum corresponds by the way to a constant you can find under "limits" of Excel's Help.
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

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