Solved

# Nested IF

Posted on 2014-03-26
Medium Priority
91 Views
Hello experts,

Here's an easy one but I am in a hurry.

See attached sample file

I need a nested IF formula in column E to get results shown.

Gary - Cincinnati
0
Question by:garyrobbins
• 3
• 3

LVL 51

Expert Comment

ID: 39957215
There's no attachment.
0

Author Comment

ID: 39957231
see sample attachment
Nested-IF-EE-3-26-14.xls
0

LVL 39

Expert Comment

ID: 39957249
Your column E doesn't apply the logic you're describing, does it?

For example, why in row 5, with a blank B, does it give the value of C, while in row 7, you return the value of A?

Thomas
0

LVL 39

Expert Comment

ID: 39957260
The formula for

If C2 is blank, use A2; if A2 is blank, use B2; otherwise leave blank

is

=IF(LEN(C2)=0,IF(LEN(A2)=0,B2,A2),"")

Thomas
0

Author Comment

ID: 39958827
Ok, Nutsch.

Help me extend this to one more variable.
If C2 is blank, use A2; if A2 is blank, use B2; if B2 is blank, use X2; otherwise leave blank

thanks,
Gary
0

LVL 39

Accepted Solution

nutsch earned 2000 total points
ID: 39958842
this should do it:

=IF(LEN(C2)=0,IF(LEN(A2)=0,if(B2="",x2,""),A2),c2)

I assumed that if C2 is not blank, then you want C2, correct?

Thomas
0

Author Closing Comment

ID: 39967164
Thanks, Thomas.  You helped me understand the LEN function.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, tâ€¦
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
###### Suggested Courses
Course of the Month5 days, 8 hours left to enroll