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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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
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

<colgroup><col style="font-weight: bold;"><col><col><col><col><col></colgroup><tbody>
</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,215,706
Messages
6,126,334
Members
449,309
Latest member
kevinsucher

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