date function

  • Thread starter Thread starter briank
  • Start date Start date
B

briank

how do I get a cell to show how many days will pass by the
end of the month. In other words, during the month of
September the cell will show 273, during October it will
show 304 and so on.

Thanks.
 
=TODAY()-"12/31/03"

or maybe

="09/30/03"-"12/31/02"

can also be written

=TODAY()-DATE(2002,12,31)
 
Hi,

If current month,
NDays = DateSerial(Year(Date), Month(Date) + 1, 0) - DateSerial(Year(Date),
1, 0)


If you're picking month from a cell (A1 for example)
d = Range("A1")
NDays = DateSerial(Year(d), Month(d) + 1, 0) - DateSerial(Year(d), 1, 0)

Regards,

Daniel M.
 
Back
Top