Nesting Issue on If statement

mmeier363

New Member
Joined
Sep 8, 2016
Messages
9
I 24 Team members that I have to place into a schedule. I have 182 cells that this has to process thorough.
in the schedule I want to place a #1 through 24 in cells and when I do it turns another cell to state TM 1 through TM 24
I ran into a nesting issue when getting past 10 TM
here is what formula I was entering but got the nesting error:
=IF(O16=1,"TM 1",IF(O16=2,"TM 2",IF(O16=3,"TM 3",IF(O16=4,"TM 4",IF(O16=5,"TM 5",IF(O16=6,"TM 6",...IF(O16=24,"TM 24","SHARE"))))))
I put in the ... for simplicity-
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Instead of all those nested IF's you could set up a table (could be on another sheet) and then use VLOOKUP.
Excel Workbook
ABCDO
1Table****
21TM 1*TM 4*
32TM 2***
43TM 3***
54TM 4***
65TM 5***
76TM 6***
87TM 7***
98TM 8***
109TM 9***
11*****
12*****
13*****
14*****
15*****
16****4
Sheet
 
Upvote 0
Instead of all those nested IF's you could set up a table (could be on another sheet) and then use VLOOKUP.

*ABCDO
****
**
***
***
***
***
***
***
***
***
*****
*****
*****
*****
*****
****

<colgroup><col style="font-weight: bold;"><col><col><col><col><col></colgroup><tbody>
[TD="bgcolor: #CACACA, align: center"]1[/TD]
[TD="align: center"]Table[/TD]

[TD="bgcolor: #CACACA, align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]TM 1[/TD]

[TD="bgcolor: #FFFF00"]TM 4[/TD]

[TD="bgcolor: #CACACA, align: center"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]TM 2[/TD]

[TD="bgcolor: #CACACA, align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]TM 3[/TD]

[TD="bgcolor: #CACACA, align: center"]5[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]TM 4[/TD]

[TD="bgcolor: #CACACA, align: center"]6[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]TM 5[/TD]

[TD="bgcolor: #CACACA, align: center"]7[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]TM 6[/TD]

[TD="bgcolor: #CACACA, align: center"]8[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]TM 7[/TD]

[TD="bgcolor: #CACACA, align: center"]9[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]TM 8[/TD]

[TD="bgcolor: #CACACA, align: center"]10[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]TM 9[/TD]

[TD="bgcolor: #CACACA, align: center"]11[/TD]

[TD="bgcolor: #CACACA, align: center"]12[/TD]

[TD="bgcolor: #CACACA, align: center"]13[/TD]

[TD="bgcolor: #CACACA, align: center"]14[/TD]

[TD="bgcolor: #CACACA, align: center"]15[/TD]

[TD="bgcolor: #CACACA, align: center"]16[/TD]

[TD="bgcolor: #00CCFF, align: center"]4[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
D2=VLOOKUP($O$16,$A$2:$B$10,2,0)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4

I like this a lot -I was trying to think of how to write a formula or a macro but I have done this before and should have thought of it- this is why many heads are better than one - Thanks for the Idea-
 
Upvote 0
You're welcome. Thanks for the feedback and welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,226,693
Messages
6,192,471
Members
453,726
Latest member
JoeH57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top