Nested if then else statement

C

clk

Hi. I need to have one cell in my summary spreadsheet that looks to
another detail spreadsheet and gives me the data if there is something
in the cell. I have it working for one but when I try to nest the "if
then else" statement it fails.

Basically what I have is this:

=IF('May 19'!K4="", "","Vac") Now I need to add to this if K5 is not
null "sick", k6 is not null "personal", etc.

It will work for one with the above formula but when I try adding more
criteria it fails. I tried this:

=IF(('May 19'!$K4=""),"",IF(('May 19'!$K5=""),"",IF(('May 19'!
$K6=""),"",IF(('May 19'!$K7=""),"",CONCATENATE(K4,K5,K6,K7,K8)))))

But that didn't work either.

Any suggestions would be appreciated.
 
L

Luke M

Anytime you have the same output for multiple checks, you can probably use
AND/OR functions. Also, CONCATENATE is a bulky function with a 30 piece
limit, and not really necessary. You can join things things together more
easily witht he ampersand.
'May 19'!
Rearranged:

=IF(OR('May 19'!$K4="",'May 19'!$K5="",'May 19'!$K6="",'May
19'!$K7=""),"",K4&K5&K6&K7&K8)

Or, another way of interpreting your question...

=IF(K4="","","Vac")&IF(K5="","","sick")&IF(K6="","","Personal")

which has you concatenating different things, with each part being
determined by an IF function. Note that following this structure, you do not
have to worry about the 7 nested function limit.
 
E

Eduardo

Hi
try

=IF('May 19'!K4<>"","Vac",IF('May 19'!K5<>"","Sick",IF('May
19'!K6<>"","Personal","")))
 
C

clk

Hi
try

=IF('May 19'!K4<>"","Vac",IF('May 19'!K5<>"","Sick",IF('May
19'!K6<>"","Personal","")))











- Show quoted text -

Thank you so much! It worked. Appreciate the suggestions!

~ Carrie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top