Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
formula using dates
I need a formula that does the following:
If A1 is between(and including) 1/1/08 and 1/31/08 I need 12/31/07 returned. I need that done for each of the 12 months, ie if A1 is between (and including) 2/1/08 and 2/28/08 I need 1/31/08 returned. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
formula using dates
=a1-day(a1)
and =date(year(a1),month(a1),0) Will both return the last day of the previous month MelB wrote: I need a formula that does the following: If A1 is between(and including) 1/1/08 and 1/31/08 I need 12/31/07 returned. I need that done for each of the 12 months, ie if A1 is between (and including) 2/1/08 and 2/28/08 I need 1/31/08 returned. -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
formula using dates
=A1-DAY(A1)
-- Damon Longworth 2007 Excel / Access User Conference Cambridge, England - Nov 29 - Dec 1, 2007 2008 Excel / Access User Conference Sydney, Australia - Tentatively March 12-14, 2008 www.ExcelUserConference.com/ "MelB" wrote in message ... I need a formula that does the following: If A1 is between(and including) 1/1/08 and 1/31/08 I need 12/31/07 returned. I need that done for each of the 12 months, ie if A1 is between (and including) 2/1/08 and 2/28/08 I need 1/31/08 returned. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
formula using dates
=DATE(YEAR(A1),MONTH(A1),0)
-- Gary''s Student - gsnu200755 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dates formula | Excel Worksheet Functions | |||
Dates formula | Excel Worksheet Functions | |||
Help with Dates in a Formula | Excel Worksheet Functions | |||
formula for dates | Excel Worksheet Functions | |||
how do I use if formula using dates? | Excel Worksheet Functions |