View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Date formula required

Or even shorter:

=DATE(YEAR(A1),MONTH(A1)-(DAY(A1)<=15),25)

In article ,
"David Biddulph" wrote:

Or, slightly shorter,
=IF(DAY(A1)<=15,DATE(YEAR(A1),MONTH(A1)-1,25),DATE(YEAR(A1),MONTH(A1),25))
--
David Biddulph

"Allllen" wrote in message
...
=IF(A1-DATE(YEAR(A1),MONTH(A1),0)<=15,DATE(YEAR(A1),MONTH (A1)-1,25),DATE(YEA
R(A1),MONTH(A1),25))

for a value in cell A1.
--
Allllen


"Compass Rose" wrote:

I need a formula that will enter a date in a cell based on today's date.
I'll
explain.

If today's date is from the 1st of the month to the 15th of the month, I
need the 25th day of the previous month in the cell. If the date is from
the
16th of the month to the last day of the month, I need the 25th day of
the
present month to appear in the cell.

Examples Today's date Cell date
11/16/2006 11/25/2006
12/5/2006 11/25/2006
1/13/2007 12/25/2006

I hope I have explained clearly.

TIA
David