Tennisguuy
Well-known Member
- Joined
- Oct 17, 2007
- Messages
- 564
- Office Version
- 2016
- Platform
- Windows
I have a situation with a table that I am using a hlookup. The problem is the lookup value might not be in the table and I will need to interpolate for the value that is not in the table.
Below is a copy of the table
10,000 15,000 25,000 50,000 75,000 100,000 150,000 250,000 500,000 750,000 1,000,000
0.007 0.006 0.005 0.004 0.003 0.003 0.002 0.002 0.04 0.05 0.055
0.002 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.04 0.05 0.055
0.003 0.002 0.002 0.002 0.001 0.001 0.001 0.002 0.04 0.05 0.055
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.04 0.05 0.055
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.04 0.05 0.055
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.04 0.05 0.055
The table is in rows Q7:AA13.
I used the following formula in cell D9 IF(B5<=4,HLOOKUP(B9,'Crime Rating'!Q7:AA13,2,FALSE)) and it works but again my problem is when the value in B9 is not in the table I will get a #N/A error. For example if the value in cell B9 is 30,000
The values in the individual row depend are in column A I was just going to copy down the formula to change the lookup row. for example in row 10 the formula would be IF(B5<=4,HLOOKUP(B9,'Crime Rating'!Q7:AA13,3,FALSE))
If interpolating within multiple row is too complex I can make a separate table with just one row of data for each of the value in column A.
Below is a copy of the table
10,000 15,000 25,000 50,000 75,000 100,000 150,000 250,000 500,000 750,000 1,000,000
0.007 0.006 0.005 0.004 0.003 0.003 0.002 0.002 0.04 0.05 0.055
0.002 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.04 0.05 0.055
0.003 0.002 0.002 0.002 0.001 0.001 0.001 0.002 0.04 0.05 0.055
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.04 0.05 0.055
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.04 0.05 0.055
0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.04 0.05 0.055
The table is in rows Q7:AA13.
I used the following formula in cell D9 IF(B5<=4,HLOOKUP(B9,'Crime Rating'!Q7:AA13,2,FALSE)) and it works but again my problem is when the value in B9 is not in the table I will get a #N/A error. For example if the value in cell B9 is 30,000
The values in the individual row depend are in column A I was just going to copy down the formula to change the lookup row. for example in row 10 the formula would be IF(B5<=4,HLOOKUP(B9,'Crime Rating'!Q7:AA13,3,FALSE))
If interpolating within multiple row is too complex I can make a separate table with just one row of data for each of the value in column A.