Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RRS from Connecticut
 
Posts: n/a
Default How to add more than 7 if nested statements. 7 is the limit.

I am trying to show 12 month names from dates, but can show only 8 since if
statments can be nested 7 times.
Eg of my data and formula:
=IF(MONTH(D2)=10,"Oct04",IF(MONTH(D2)=11,"Nov04",I F(MONTH(D2)=1,"Jan05",IF(MONTH(D2)=2,"Feb05",IF(MO NTH(D2)=3,"Mar05",IF(MONTH(D2)=12,"Dec04",IF(MONTH (D2)=4,"Apr05")))))))
I need to join the if statment to show the rest of the months.
Thanks.
RRS.
  #4   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,

One possibility:
Create a helper list in two columns (say X1:X12, Y1:Y12) and populate them
with numbers and month/year-info (1 in X1 and Jan-05 in Y1,......10 in X10
and Oct-04 in Y10,...12 in X12 and Dec-04 in Y12). Now use the formula in,
say E2,

=VLOOKUP(MONTH(D2),$X$1:$Y$12,2)

Regards,
B. R. Ramachandran


"RRS from Connecticut" wrote:

I am trying to show 12 month names from dates, but can show only 8 since if
statments can be nested 7 times.
Eg of my data and formula:
=IF(MONTH(D2)=10,"Oct04",IF(MONTH(D2)=11,"Nov04",I F(MONTH(D2)=1,"Jan05",IF(MONTH(D2)=2,"Feb05",IF(MO NTH(D2)=3,"Mar05",IF(MONTH(D2)=12,"Dec04",IF(MONTH (D2)=4,"Apr05")))))))
I need to join the if statment to show the rest of the months.
Thanks.
RRS.

  #5   Report Post  
Roger Govier
 
Posts: n/a
Default

Just to add another variation to the answers already received from Bernie
and Niek, you could just format cell D2 (and the rest of the column if
required) as

Format CellsNumberCustom mmmyy

Regards

Roger Govier


RRS from Connecticut wrote:
I am trying to show 12 month names from dates, but can show only 8 since if
statments can be nested 7 times.
Eg of my data and formula:
=IF(MONTH(D2)=10,"Oct04",IF(MONTH(D2)=11,"Nov04",I F(MONTH(D2)=1,"Jan05",IF(MONTH(D2)=2,"Feb05",IF(MO NTH(D2)=3,"Mar05",IF(MONTH(D2)=12,"Dec04",IF(MONTH (D2)=4,"Apr05")))))))
I need to join the if statment to show the rest of the months.
Thanks.
RRS.



  #6   Report Post  
Niek Otten
 
Posts: n/a
Default

The beauty of simplicity!

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"Roger Govier" wrote in message
...
Just to add another variation to the answers already received from Bernie
and Niek, you could just format cell D2 (and the rest of the column if
required) as

Format CellsNumberCustom mmmyy

Regards

Roger Govier


RRS from Connecticut wrote:
I am trying to show 12 month names from dates, but can show only 8 since
if statments can be nested 7 times. Eg of my data and formula:
=IF(MONTH(D2)=10,"Oct04",IF(MONTH(D2)=11,"Nov04",I F(MONTH(D2)=1,"Jan05",IF(MONTH(D2)=2,"Feb05",IF(MO NTH(D2)=3,"Mar05",IF(MONTH(D2)=12,"Dec04",IF(MONTH (D2)=4,"Apr05")))))))
I need to join the if statment to show the rest of the months. Thanks.
RRS.



  #7   Report Post  
Roger Govier
 
Posts: n/a
Default

Thanks Niek

If only I could think that way always!!!
I usually use the sledgehammer.

Regards

Roger Govier


Niek Otten wrote:
The beauty of simplicity!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Nested If Statements THEFALLGUY Excel Discussion (Misc queries) 6 September 3rd 05 10:03 AM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
Employing constant arrays to limit nested IF statements. Richard-44 Excel Worksheet Functions 2 January 6th 05 02:19 AM
nested statements Sherri New Users to Excel 6 December 3rd 04 07:04 PM
Do I need nested IF statements? Jaramya Excel Worksheet Functions 1 November 5th 04 09:10 PM


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"