A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multiple lookup between two dates



 
 
Thread Tools Display Modes
  #1  
Old February 9th, 2010, 05:58 PM posted to microsoft.public.excel.worksheet.functions
Ales
external usenet poster
 
Posts: 3
Default Multiple lookup between two dates

Hi,
I have a ratesheet in excel like e.g.

Carrier FromDate ToDate Rate
A 01.02.10. 28.02.10. 100
A 01.01.10. 14.01.10. 99
A 15.01.10. 31.01.10. 98
B 13.01.10. 31.10.10. 101
C 16.01.10. 21.02.10. 97
A 13.12.09. 28.12.09. 101
etc.

The date for respective carrier are not overlapping. So in the rate sheet
will never happen, that a rate is valid for carrier A fm 01.01.10. till
31.01.10. and another rate for the same carrier A fm 15.01.10. till 31.01.10.
In such case the previous one will be valid just till 14.01.10.

I need a formula if e.g. I wd like to find what rate was valid on 18.01.10.
for carrier A (in this example it wd be in third row the rate 98).

Tks for any help !
Ales

  #2  
Old February 9th, 2010, 06:16 PM posted to microsoft.public.excel.worksheet.functions
Luke M
external usenet poster
 
Posts: 2,672
Default Multiple lookup between two dates

Assuming carrier is in cell E2, date is in F2, something like this:

=SUMPRODUCT(--(A2:A10=E2),--(B2:B10=F2),--(C2:C10=F2),D210)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Ales" wrote:

Hi,
I have a ratesheet in excel like e.g.

Carrier FromDate ToDate Rate
A 01.02.10. 28.02.10. 100
A 01.01.10. 14.01.10. 99
A 15.01.10. 31.01.10. 98
B 13.01.10. 31.10.10. 101
C 16.01.10. 21.02.10. 97
A 13.12.09. 28.12.09. 101
etc.

The date for respective carrier are not overlapping. So in the rate sheet
will never happen, that a rate is valid for carrier A fm 01.01.10. till
31.01.10. and another rate for the same carrier A fm 15.01.10. till 31.01.10.
In such case the previous one will be valid just till 14.01.10.

I need a formula if e.g. I wd like to find what rate was valid on 18.01.10.
for carrier A (in this example it wd be in third row the rate 98).

Tks for any help !
Ales

  #3  
Old February 10th, 2010, 05:32 PM posted to microsoft.public.excel.worksheet.functions
Ales
external usenet poster
 
Posts: 3
Default Multiple lookup between two dates


tks Luke !!
Needed half day experimenting why the formula returns "N/A" and how to make
the formula if the worksheet has different rows (next month more) . The "N/A"
reason was that at the end of my 2000 rows in column A there were few "N/A"
which I did not see initially and which caused the formula to return "N/A".
When I deleted the "N/A"-rows works now. Tks a lot !

Ales
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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