Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Formula for Between Dates (Excel 03)

Hi,

I am looking for a formula that does the following. If =1/04/2009 and <=
1/31/2009 then P10 / If = 2/1/2009 and <= 2/28/2009 then P11.....

Any assistance is greatly appreciated.

Thank you,
Havenstar
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Formula for Between Dates (Excel 03)

You did not say what cell holds the date; I will use A1
=IF(and(A1 =DATEVALUE("1/04/2009",a1 <= DATEVALUE(1/31/2009),P10,IF(and(A1
=DATEVALUE("2/1/2009"),a1 <= DATEVALUE("2/18/2009"),P11,"x")

You can replace "x" by another IF to seven levels but it will get messy

This seems better =INDIRECT("P"&MONTH(A1)+9)
But it will give P10 for all days in Jan
Fix it with
=IF(A1DATEVALUE(1/03/2009),INDIRECT("P"&MONTH(A1)+9),"")
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Havenstar" wrote in message
...
Hi,

I am looking for a formula that does the following. If =1/04/2009 and <=
1/31/2009 then P10 / If = 2/1/2009 and <= 2/28/2009 then P11.....

Any assistance is greatly appreciated.

Thank you,
Havenstar



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default Formula for Between Dates (Excel 03)

A few ways to do this. I noticed your formula for January didn't include the
whole month. To use specific dates like that, you could use an IF(AND:

=IF(AND(A10=DATE(2009,1,4),A10<DATE(2009,2,1)),P1 0,"not")

But if you can just allow the month alone as a check, you could try this:

=IF(MONTH(A11)=2,P11,"not Feb")

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Havenstar" wrote:

Hi,

I am looking for a formula that does the following. If =1/04/2009 and <=
1/31/2009 then P10 / If = 2/1/2009 and <= 2/28/2009 then P11.....

Any assistance is greatly appreciated.

Thank you,
Havenstar

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Formula for Between Dates (Excel 03)

Thanks JB - I added an = to before the second date and it worked perfeclty.

Havenstar

"JBeaucaire" wrote:

A few ways to do this. I noticed your formula for January didn't include the
whole month. To use specific dates like that, you could use an IF(AND:

=IF(AND(A10=DATE(2009,1,4),A10<DATE(2009,2,1)),P1 0,"not")

But if you can just allow the month alone as a check, you could try this:

=IF(MONTH(A11)=2,P11,"not Feb")

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Havenstar" wrote:

Hi,

I am looking for a formula that does the following. If =1/04/2009 and <=
1/31/2009 then P10 / If = 2/1/2009 and <= 2/28/2009 then P11.....

Any assistance is greatly appreciated.

Thank you,
Havenstar

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default Formula for Between Dates (Excel 03)

Careful there, I used Feb 1 as the cutoff, so I believe just a < is correct.
If you manually figure the last day of each month (ugh) then =<Jan 31 would
work, I just thought <Feb1 is less mental gymnastics.

Cheers.
--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Havenstar" wrote:

Thanks JB - I added an = to before the second date and it worked perfeclty.

Havenstar

"JBeaucaire" wrote:

A few ways to do this. I noticed your formula for January didn't include the
whole month. To use specific dates like that, you could use an IF(AND:

=IF(AND(A10=DATE(2009,1,4),A10<DATE(2009,2,1)),P1 0,"not")

But if you can just allow the month alone as a check, you could try this:

=IF(MONTH(A11)=2,P11,"not Feb")

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.

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
EXCEL - formula for linking dates and prices ekonomija Excel Worksheet Functions 0 November 30th 07 01:58 PM
formula for # of days between two dates-Excel 2000 kelley Excel Discussion (Misc queries) 1 June 29th 07 06:52 PM
formula in excel to track times between two different dates ? bmg Excel Worksheet Functions 3 February 21st 06 05:02 AM
Excel should have a formula for Converting Julian Dates Yakimeshi Excel Worksheet Functions 0 May 17th 05 06:23 PM
Excel should have a formula for Converting Julian Dates Peo Sjoblom Excel Worksheet Functions 0 May 17th 05 06:15 PM


All times are GMT +1. The time now is 06:55 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"