Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
clk clk is offline
external usenet poster
 
Posts: 17
Default Nested if then else statement

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.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Nested if then else statement

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.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"clk" wrote:

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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default Nested if then else statement

Hi
try

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

"clk" wrote:

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.


  #4   Report Post  
Posted to microsoft.public.excel.misc
clk clk is offline
external usenet poster
 
Posts: 17
Default Nested if then else statement

On Jul 7, 12:47*pm, Eduardo wrote:
Hi
try

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



"clk" wrote:
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.- Hide quoted text -


- Show quoted text -


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

~ Carrie
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested If/and statement ScoobyDoo Excel Worksheet Functions 2 February 25th 08 06:22 PM
Nested IF Statement Secret Squirrel Excel Discussion (Misc queries) 8 November 19th 06 02:43 AM
Nested IF/AND Statement buffgirl71 Excel Discussion (Misc queries) 1 October 10th 06 01:59 AM
Nested IF/AND Statement buffgirl71 Excel Discussion (Misc queries) 5 October 10th 06 01:07 AM
Nested IF statement jgannon Excel Discussion (Misc queries) 3 November 22nd 05 11:55 PM


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"