Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default A Substitute for Vlookup

I have the following problem with my excel table. Maybe you can help.

This is the table I have:

A B

33 5.5462
62 5.5556
90 5.5524
182 5.5220

column A represent a number of days and B interest rate values.

I'm looking for a formula that will return the interest rate of any
given day that is in between 33 and 182.
So if the number of days is 33, it will return 5.5462.
But if it is 40, the formula will find the interest rate using
interpolation
from the closet values (the formula knows that 40 is between 33 and 62
therefore it will use 33, 62, 5.5462 and 5.5556). The same holds for 75
for example (62, 90, 5.5556 and 5.5524)
I know how to make the interpolation work I just need the formula for
the reference.

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default A Substitute for Vlookup

It works fine except for the last value for which it returns #DIV/0!

So in my example, if I enter 182 I get in error...

Thanks,

Amir


Alok wrote:
Hi
I am giving you a non-VBA answer and see if it works for you.
You can use the formula

=FORECAST(A6,OFFSET(B1:B2,MATCH(A6,A1:A4,1)-1,0),OFFSET(A1:A2,MATCH(A6,A1:A4,1)-1,0))

This assumes that your x values are in A1 to A4 in ascending order. The
corresponding y values are in B1 to B4 and the x value for which you want to
find the corresponding y value is in A6.

Alok

"amirstal" wrote:

I have the following problem with my excel table. Maybe you can help.

This is the table I have:

A B

33 5.5462
62 5.5556
90 5.5524
182 5.5220

column A represent a number of days and B interest rate values.

I'm looking for a formula that will return the interest rate of any
given day that is in between 33 and 182.
So if the number of days is 33, it will return 5.5462.
But if it is 40, the formula will find the interest rate using
interpolation
from the closet values (the formula knows that 40 is between 33 and 62
therefore it will use 33, 62, 5.5462 and 5.5556). The same holds for 75
for example (62, 90, 5.5556 and 5.5524)
I know how to make the interpolation work I just need the formula for
the reference.

Thanks.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
would like to substitute and return value of 0 for vlookup #N/A er egols Excel Worksheet Functions 3 June 26th 07 11:24 PM
Substitute for Vlookup amirstal Excel Programming 1 December 15th 06 09:58 PM
VLOOKUP - WISH TO SUBSTITUTE FALSE FOR A VALUE David Excel Discussion (Misc queries) 6 July 13th 06 01:43 AM
Is there a VLOOKUP substitute when data is not in ascending order VJ7777 Excel Worksheet Functions 2 January 19th 05 08:32 AM
A question about decoding, substitute or vlookup of character. Alan Pong Excel Programming 2 October 10th 03 08:24 AM


All times are GMT +1. The time now is 12:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"