ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Mini-editor for nested IF's in Excel (https://www.excelbanter.com/excel-discussion-misc-queries/2942-mini-editor-nested-ifs-excel.html)

Erik Neu

Mini-editor for nested IF's in Excel
 
I would say I'm a low-level Excel poweruser (say, 8 on a scale of 10). I have
no problem writing an IF statement, andsometimes I even write nested IF
statements. But they are HELL to debug. Ioften find myself wishing that Excel
had a rudimentary editor to show them asindented and blocked for human
readability.

JE McGimpsey

If you're making a suggestion to MS, this isn't the right place - send a
message to instead (this is a peer-to-peer
newsgroup).

Generally, if you're having to nest more than 2, possibly 3, deep, there
are better ways to handle the situation - either through math (for
strictly numeric solutions) or via lookup tables. Most "power users" I
know severely limit their nested IF() functions, other than, say,
wrapper functions that test initial conditions, e.g.:
IF(A1="","",IF(...)).

Nested IF's are notorious for making spreadsheets difficult to
debug/modify, since they often hard-code data that will change from time
to time. And, as you've stated, they can be typographically confusing.

In article ,
"Erik Neu" <Erik
wrote:

I would say I'm a low-level Excel poweruser (say, 8 on a scale of 10). I have
no problem writing an IF statement, andsometimes I even write nested IF
statements. But they are HELL to debug. Ioften find myself wishing that Excel
had a rudimentary editor to show them asindented and blocked for human
readability.


Aladin Akyurek

A laudable idea... But, why don't try to re-express those lengthy
IF-formulas in terms of other functions? More often than not, such
formulas are re-writeable as lookup formulas.

Erik Neu wrote:
I would say I'm a low-level Excel poweruser (say, 8 on a scale of 10). I have
no problem writing an IF statement, andsometimes I even write nested IF
statements. But they are HELL to debug. Ioften find myself wishing that Excel
had a rudimentary editor to show them asindented and blocked for human
readability.


Dave Peterson

Excel is very forgiving.
Try putting some alt-enters and extra spaces into your formula (before the
commas that separate the parms is nice).

You may be pleasantly surprised how it looks.

I put this simple formula in a cell and excel parsed it ok:

=IF(A1=B1,
C1,
D1)



Erik Neu wrote:

I would say I'm a low-level Excel poweruser (say, 8 on a scale of 10). I have
no problem writing an IF statement, andsometimes I even write nested IF
statements. But they are HELL to debug. Ioften find myself wishing that Excel
had a rudimentary editor to show them asindented and blocked for human
readability.


--

Dave Peterson


All times are GMT +1. The time now is 03:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com