#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Nested IF Statement

I'm trying to work an IF statement with these conditions:

If E2 = "Open" then U2
If E2 = "Closed" & S2 = "" then T2, and if E2 = "Closed" and S2 is not blank
then ""

I've tried this a few different ways but haven't been able to come up with
my solution. Can anyone help me write this?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 740
Default Nested IF Statement

try 1st excel facility : click fx button

"Secret Squirrel" wrote:

I'm trying to work an IF statement with these conditions:

If E2 = "Open" then U2
If E2 = "Closed" & S2 = "" then T2, and if E2 = "Closed" and S2 is not blank
then ""

I've tried this a few different ways but haven't been able to come up with
my solution. Can anyone help me write this?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Nested IF Statement

What happens if the entries are not exactly as you specified? I have the
formula returning "Your Data is not correct"

=IF(TRIM(E2)="Open","",IF(AND(TRIM(E2)="Closed",TR IM(S2)=""),T2,IF(AND(TRIM(E2)="Closed",S2<""),"", "Your
Data is not correct")))

The TRIM() function are to take care of any spaces that you previously
reported in your data

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Secret Squirrel" wrote in
message ...
I'm trying to work an IF statement with these conditions:

If E2 = "Open" then U2
If E2 = "Closed" & S2 = "" then T2, and if E2 = "Closed" and S2 is not
blank
then ""

I've tried this a few different ways but haven't been able to come up with
my solution. Can anyone help me write this?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Nested IF Statement

I tried using the fx button but I can't seem to figure out how to create
nested if statements using that button. Can you help shed some light on this?

"driller" wrote:

try 1st excel facility : click fx button

"Secret Squirrel" wrote:

I'm trying to work an IF statement with these conditions:

If E2 = "Open" then U2
If E2 = "Closed" & S2 = "" then T2, and if E2 = "Closed" and S2 is not blank
then ""

I've tried this a few different ways but haven't been able to come up with
my solution. Can anyone help me write this?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Nested IF Statement

=IF(E2="Open",U2,IF(E2="Closed",IF(S2="",T2,""),"" )

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Secret Squirrel" wrote in
message ...
I'm trying to work an IF statement with these conditions:

If E2 = "Open" then U2
If E2 = "Closed" & S2 = "" then T2, and if E2 = "Closed" and S2 is not

blank
then ""

I've tried this a few different ways but haven't been able to come up with
my solution. Can anyone help me write this?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Nested IF Statement

Good point. Here's a more detailed layout of what I'm looking for

If E2 is "Open" then in cell X2 I want the value of U2.
If E2 is "Closed" and S2 is 0 then I want the value in X2 to be T2.
And if E2 is "Closed" and S2 is greater than 0 then I want the value in X2
to be 0.

"Sandy Mann" wrote:

What happens if the entries are not exactly as you specified? I have the
formula returning "Your Data is not correct"

=IF(TRIM(E2)="Open","",IF(AND(TRIM(E2)="Closed",TR IM(S2)=""),T2,IF(AND(TRIM(E2)="Closed",S2<""),"", "Your
Data is not correct")))

The TRIM() function are to take care of any spaces that you previously
reported in your data

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Secret Squirrel" wrote in
message ...
I'm trying to work an IF statement with these conditions:

If E2 = "Open" then U2
If E2 = "Closed" & S2 = "" then T2, and if E2 = "Closed" and S2 is not
blank
then ""

I've tried this a few different ways but haven't been able to come up with
my solution. Can anyone help me write this?





  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Nested IF Statement

That will work but since the format in S2 is Accounting how do I tell the
formula that a "$ - " is the same as "" in the formula?

"Bob Phillips" wrote:

=IF(E2="Open",U2,IF(E2="Closed",IF(S2="",T2,""),"" )

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Secret Squirrel" wrote in
message ...
I'm trying to work an IF statement with these conditions:

If E2 = "Open" then U2
If E2 = "Closed" & S2 = "" then T2, and if E2 = "Closed" and S2 is not

blank
then ""

I've tried this a few different ways but haven't been able to come up with
my solution. Can anyone help me write this?





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27,285
Default Nested IF Statement

if the cell is formatted as accounting and it displays as $ - then it
contains a zero - it isn't the same as "". If it is empty, it looks empty
for me.

In any event, for currency formatting, the if formula will look at what is
stored in the cell, not how it appears

--
Regards,
Tom Ogilvy


"Secret Squirrel" wrote in
message ...
That will work but since the format in S2 is Accounting how do I tell the
formula that a "$ - " is the same as "" in the formula?

"Bob Phillips" wrote:

=IF(E2="Open",U2,IF(E2="Closed",IF(S2="",T2,""),"" )

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Secret Squirrel" wrote in
message ...
I'm trying to work an IF statement with these conditions:

If E2 = "Open" then U2
If E2 = "Closed" & S2 = "" then T2, and if E2 = "Closed" and S2 is not

blank
then ""

I've tried this a few different ways but haven't been able to come up
with
my solution. Can anyone help me write this?







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 statement with VLOOKUP James Hamilton Excel Discussion (Misc queries) 1 August 16th 06 07:46 AM
:confused: Nested if then else statement polk383 Excel Worksheet Functions 4 May 28th 06 06:02 PM
Nested IF Statement Question EleKtriKaz Excel Discussion (Misc queries) 6 April 5th 06 06:21 AM
Problem with nested IF_OR statement DOOGIE Excel Worksheet Functions 7 June 24th 05 03:27 AM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM


All times are GMT +1. The time now is 07:27 PM.

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

About Us

"It's about Microsoft Excel"