ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If statement (https://www.excelbanter.com/excel-discussion-misc-queries/166152-re-if-statement.html)

Ola2B

If statement
 

Excel refuses to accept more argument as per below. Foe example i
wanted to add "if("January","December"). it would not let me further
that the argument below. Can anyone please help!!!!!!

=IF(I5="MAY","APRIL",IF(I5="JUNE","MAY",IF(I5="JUL Y","JUNE",IF(I5="AUGUST","JULY",IF(I5="SEPTEMBER", "AUGUST",IF(I5="OCTOBER","SEPTEMBER",IF(I5="NOVEMB ER","OCTOBER",IF(I5="DECEMBER","NOVEMBER"))))))) )

Many thanks in advance,
Ola.


Dave Peterson

If statement
 
How about something like:

=TEXT(DATE(2007,MONTH(DATEVALUE(I5&"-2007"))-1,1),"MMMM")



Ola2B wrote:

Excel refuses to accept more argument as per below. Foe example i
wanted to add "if("January","December"). it would not let me further
that the argument below. Can anyone please help!!!!!!

=IF(I5="MAY","APRIL",IF(I5="JUNE","MAY",IF(I5="JUL Y","JUNE",IF(I5="AUGUST","JULY",IF(I5="SEPTEMBER", "AUGUST",IF(I5="OCTOBER","SEPTEMBER",IF(I5="NOVEMB ER","OCTOBER",IF(I5="DECEMBER","NOVEMBER"))))))) )

Many thanks in advance,
Ola.


--

Dave Peterson

Ola2B

If statement
 
Many thanks Dave! it now works perfectly.

Dave Peterson wrote:

How about something like:

=TEXT(DATE(2007,MONTH(DATEVALUE(I5&"-2007"))-1,1),"MMMM")



Ola2B wrote:

Excel refuses to accept more argument as per below. Foe example i
wanted to add "if("January","December"). it would not let me further
that the argument below. Can anyone please help!!!!!!

=IF(I5="MAY","APRIL",IF(I5="JUNE","MAY",IF(I5="JUL Y","JUNE",IF(I5="AUGUST","JULY",IF(I5="SEPTEMBER", "AUGUST",IF(I5="OCTOBER","SEPTEMBER",IF(I5="NOVEMB ER","OCTOBER",IF(I5="DECEMBER","NOVEMBER"))))))) )

Many thanks in advance,
Ola.


--

Dave Peterson



All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com