View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Date formula needed

On Fri, 09 Dec 2005 13:01:17 -0500, Ron Rosenfeld
wrote:

On Fri, 9 Dec 2005 03:35:02 -0800, "Rich Hayes"
wrote:

Hi

If in cell A1 I have a month name for example: 'January'

In cell D1 i want to say, if the month in cell A1 says 'January' then add a
month and show 'February' in cell D1 and so on so that in cell G1 i want to
say if cell D1 shows 'February' then add a month and show 'March' in cell G1.

The first month won't always be January!

Is this possible?

Many thanks

Rich


This assumes you have typed the name of the month into A1:

=TEXT(DATEVALUE("1 "& A1&" "&YEAR(TODAY()))+31,"mmmm")


--ron


Actually, it could be simplified to:

=TEXT(DATEVALUE("1 "& A1)+31,"mmmm")

I think the above will work in all regions, but if it does not, you could try:

=TEXT(DATEVALUE("1 "& A1 & " 2000")+31,"mmmm")


--ron