Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Nested IF

Posted on 2014-03-26
Medium Priority
89 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
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 3
• 3

LVL 49

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calculâ€¦
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
###### Suggested Courses
Course of the Month8 days, 15 hours left to enroll