LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
KimberlyC
 
Posts: n/a
Default More help need with my double col lookup function

Hi,
Below is my table of data

A B C
State Eff Date Amt
AL 1/1/2003 10000
AL 2/1/2004 6000
AL 4/1/2004 8000
CA 1/1/2002 20000
CA 1/1/2003 30000
CA 1/1/2005 15500



My Criteria is entered into cells:
K19 = "state"
N19 = "a date"

The answer (which is the amount in col C of the table) should go into cell
Q19

Here is the array formula I'm using in Q19
=INDEX($C$3:$C$7,MATCH(1,($A$3:$A$7=K19)*($B$3:$B$ 7=N19),0))

For Example: If my crieteria is:
K19= AL
N19 = 1/1/2003
Q19 =10000

This is working great..as long as the dates I entered into N19 match up
exactly to what is in the table in col B.

HOWEVER.... I now need to make the formula look at the State in K19 and then
look at the date that is entered into N19 (as it could be any date..and will
not match what is in the table for "eff. date") and select the amount that
is closest to that date (in N19) without selecting an amount that is
greater than N19.
For Eample:
If K19 = CA and N19 = 7/1/2004
Then Q19 = 30000 (It selected the amount for CA ,eff date of 1/1/03..which
is closest to 7/1/04 without selecting a date that was greater than 7/1/04)

I cannot figure out how to incorporate this into the formula above....

Any help is greatly appreicated..
Thanks in advance!!
Kimberly








 
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
How can i use > in lookup function? AZHawkPilot Excel Discussion (Misc queries) 3 October 25th 09 01:32 AM
Lookup Function Error Jacinthe Excel Worksheet Functions 2 March 10th 05 07:37 AM
Lookup Function Problem seve Excel Discussion (Misc queries) 9 February 28th 05 02:46 AM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


All times are GMT +1. The time now is 05:06 PM.

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

About Us

"It's about Microsoft Excel"