General Guidance for 10 nested if else

luckVIII

New Member
Joined
Sep 18, 2018
Messages
4
Hi Everyone,
I'm need some advice for nested if else. I needed a 10 item if-else situation and I am aware that the limit is 7. Plus I need it to continuously need to check value such that if user changes values, the if-else statements will auto adjust to new message(while retaining the ability to copy and paste).

The newer excel supports IFS which is awesome and I can get it to work on my laptop but unfortunately the computers actually using it can't be upgraded to support this (plus I want to be sure that it works on all computers no matter where the file is). I am aware of concatenation option but unfortunately I really do need to have some checks from the if else statements to prevent odd results (because my conditions involve three different cells with greater and less than values). I just tried to do a combo of concatenation and if-else statements but got some very weird results.

I am thinking of using VBA but would like the way if-else works. This would ensure that when ever user changes values in the cell, the if-else would be automatically updated with newest message. I tried VBA with Worksheet_SelectionChange(ByVal Target As Range) but when I tried copy and pasting these cells became inaccessible.

Thanks again for your knowledge and insight.
B
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I maybe could provide a Vba solution. But you have provided no details.

If what cell value= what then do what?
 
Upvote 0
It's rare to need so many nested IFs and suspect you could probably get away with fewer with some logic changes.

Worksheet_Change is the event you need for a value change in a cell, Worksheet_SelectionChange is when you change the activecell to a different one.

Start by providing examples of inputs and expected outputs.

Without your worksheet (that's in front of and visible to you only, not a reader of the post), the post doesn't detail any specifics so replies will be as vague, if ultimately you're after a working VBA solution.
 
Upvote 0
.. I am aware that the limit is 7.
Unless you are using a very old Excel version (2003 or earlier) the limit (since Excel 2007) is 64 levels of nesting, not 7.
Having said that, I agree that there is often a better way than a lot of nesting so waiting on more details as requested by the other posters.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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