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
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
17,006
Office Version
  1. 2013
Platform
  1. Windows
I maybe could provide a Vba solution. But you have provided no details.

If what cell value= what then do what?
 

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,691
Office Version
  1. 365
Platform
  1. Windows
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.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
46,886
Office Version
  1. 365
Platform
  1. Windows
.. 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.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,117
Messages
5,546,038
Members
410,721
Latest member
adi772
Top