Date formula needed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hi Rich

In cell 1, enter 01/01/2005 but format the cell Format>Cells>Number>Custom>
mmmm so it displays as January
in D1
=DATE(YEAR(A1),MONTH(A1)+1,1)
Ensure formatting of D1 is the same as A1
Copy the formula to G1 etc. as required.

Regards

Roger Govier
 
One way would be to make a table,
AA1:AA12 = January through December
AB1:AB12 = February through January
Then sort the table alphabetically ascending on column AA,

Then use:

=VLOOKUP(A1,$AA$1:$AB$12,2,TRUE) in D1 and copy over to G1, etc.

Vaya con Dios,
Chuck, CABGx3
 
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
 
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
 
Back
Top