Code for the month before this month

herbertioz

Registered User.
Local time
Today, 03:21
Joined
Nov 6, 2009
Messages
66
I have this code:
Code:
=UCase(MonthName(Month(Now())))

It prints out June, but I need it to print out May. How can I do that?
 
=UCase(MonthName(Month(DateAdd("m", -1, Date()))
 
MonthName(month(date)-1)
 
Thanks a lot, Plog! But I had to change it a bit to get it to work. The final code that works:

Code:
=UCase(MonthName(Month(DateAdd("m";-1;Date()))))
 

Users who are viewing this thread

Back
Top Bottom