copy this macro in Excel spreadsheet..U can edit this by opening VB editor


Sub dateFunc()
'

' dateFunc Macro
' Macro recorded 6/9/00 by Neelesh
'


currDt = Date 'day when u want to run macro
newdt = currDt
currmon = Month(currDt) 'stores curr month
For num = 2 To 32 '2 assuming ur cell starts as location 2, 32 bcos max possible days=31
cellnum = Chr(32) & "B" & LTrim(Str(num)) & Chr(32)
Range(cellnum).Select
ActiveCell.FormulaR1C1 = newdt
newdt = newdt - 1 'day b4
If Month(newdt) <> currmon Then Exit Sub

Next num

End Sub