ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Logical formula with dates (https://www.excelbanter.com/excel-worksheet-functions/8333-re-logical-formula-dates.html)

Peo Sjoblom

Logical formula with dates
 
First of all, no need to use TRUE here, also no need to make 2005 or 2004 as
text by enlsoing them in quotes, this should work

=IF(ISBLANK(E3),"",IF(E3="TBD",2005,IF(E3--"1/15/2005",2005,IF(E3<=--"1/15/2005",2004,""))))


could be rewritten as

=IF(ISBLANK(E3),"",IF(OR(E3="TBD",E3--"1/15/2005"),2005,2004))

Regards,

Peo Sjoblom

"Pablo Picasso" wrote:

I am trying to use the following formula to determine wether an event has
occurred in 2004 (when it was scheduled) or if it will be pushed to 2005
(after 1/15/05), anything with a TBD needs to be pushed to 2005, and any
blank cells should be ignored. The formula is breaking when any date with
2004 appears.

=IF((ISBLANK(E3))=TRUE,"",IF(E3="TBD","2005",IF(E3 1/15/2005,"2005",IF(E3<=1/15/2005,"2004",""))))

here is a look at the spreadsheet:
A B C D E
1 Store Project Start End Actual
2 Atlanta Remodel 10/26/04 1/15/05 2005
3 Reset TBD TBD 2005
4
5 Chicago Remodel 9/21/04 12/15/04 2005
6 Reset TBD TBD 2005


Pablo Picasso

when I pasted the formula in to a shorter version to copy the formula
references were transposed, the formula should read:

=IF((ISBLANK(D3))=TRUE,"",IF(D3="TBD","2005",IF(D3 1/15/2005,"2005",IF(D3<=1/15/2005,"2004",""))))

The formula appears in the "E" column...

"Pablo Picasso" wrote:

I am trying to use the following formula to determine wether an event has
occurred in 2004 (when it was scheduled) or if it will be pushed to 2005
(after 1/15/05), anything with a TBD needs to be pushed to 2005, and any
blank cells should be ignored. The formula is breaking when any date with
2004 appears.

=IF((ISBLANK(E3))=TRUE,"",IF(E3="TBD","2005",IF(E3 1/15/2005,"2005",IF(E3<=1/15/2005,"2004",""))))

here is a look at the spreadsheet:
A B C D E
1 Store Project Start End Actual
2 Atlanta Remodel 10/26/04 1/15/05 2005
3 Reset TBD TBD 2005
4
5 Chicago Remodel 9/21/04 12/15/04 2005
6 Reset TBD TBD 2005



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com