#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default IF AND functions

Hi, I'm trying to create an answer using a combination of "and" and "if"
statements for a number of cells - without success. I've done the following
formula =IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q2 ). Can anyone help
me with what I'm missing to make the formula look for the "true" or "false"
result across the 4 cells? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF AND functions

=IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q 2)

You don't want to quote numbers: "0"

Try it like this:

=IF(AND(AA2="p",Q2=0,U2=0,T2="nil"),0,Q2)


--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
Hi, I'm trying to create an answer using a combination of "and" and "if"
statements for a number of cells - without success. I've done the
following
formula =IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q2 ). Can anyone
help
me with what I'm missing to make the formula look for the "true" or
"false"
result across the 4 cells? Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default IF AND functions

Hi Biff, I think maybe my assumptions of true vs false may be the problem.
Column Q is either value or 0, column T is either nil or something else
(alpha numeric combinations) row U is 0 - 4. If there is value - more than 0
in Q and either nil or 0 in T or U columns I want it to to give me the value
of Q. Currently with the below formulas it gives me the value of Q whether U
or T meet my true criteria or not.
"T. Valko" wrote:

=IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q 2)


You don't want to quote numbers: "0"

Try it like this:

=IF(AND(AA2="p",Q2=0,U2=0,T2="nil"),0,Q2)


--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
Hi, I'm trying to create an answer using a combination of "and" and "if"
statements for a number of cells - without success. I've done the
following
formula =IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q2 ). Can anyone
help
me with what I'm missing to make the formula look for the "true" or
"false"
result across the 4 cells? Thanks




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF AND functions

I'm confused!

Is nil slang for an empty cell or do you mean the literal word nil?

--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
Hi Biff, I think maybe my assumptions of true vs false may be the problem.
Column Q is either value or 0, column T is either nil or something else
(alpha numeric combinations) row U is 0 - 4. If there is value - more than
0
in Q and either nil or 0 in T or U columns I want it to to give me the
value
of Q. Currently with the below formulas it gives me the value of Q whether
U
or T meet my true criteria or not.
"T. Valko" wrote:

=IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q 2)


You don't want to quote numbers: "0"

Try it like this:

=IF(AND(AA2="p",Q2=0,U2=0,T2="nil"),0,Q2)


--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
Hi, I'm trying to create an answer using a combination of "and" and
"if"
statements for a number of cells - without success. I've done the
following
formula =IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q2 ). Can
anyone
help
me with what I'm missing to make the formula look for the "true" or
"false"
result across the 4 cells? Thanks






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default IF AND functions

'nil' is the literal word

"T. Valko" wrote:

I'm confused!

Is nil slang for an empty cell or do you mean the literal word nil?

--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
Hi Biff, I think maybe my assumptions of true vs false may be the problem.
Column Q is either value or 0, column T is either nil or something else
(alpha numeric combinations) row U is 0 - 4. If there is value - more than
0
in Q and either nil or 0 in T or U columns I want it to to give me the
value
of Q. Currently with the below formulas it gives me the value of Q whether
U
or T meet my true criteria or not.
"T. Valko" wrote:

=IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q 2)

You don't want to quote numbers: "0"

Try it like this:

=IF(AND(AA2="p",Q2=0,U2=0,T2="nil"),0,Q2)


--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
Hi, I'm trying to create an answer using a combination of "and" and
"if"
statements for a number of cells - without success. I've done the
following
formula =IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q2 ). Can
anyone
help
me with what I'm missing to make the formula look for the "true" or
"false"
result across the 4 cells? Thanks








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF AND functions

If there is value - more than 0 in Q and
either nil or 0 in T or U columns
I want it to to give me the value of Q.


Ok, that sounds like an OR condition for the second line:

AND Q0, OR T="nil", U=0

Try this:

=IF(AND(AA2="p",N(Q2)0,OR(U2=0,T2="nil")),Q2,0)

If U2 is an empty cell it will evaluate as 0. Is that something you'd need
to account for?


--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
'nil' is the literal word

"T. Valko" wrote:

I'm confused!

Is nil slang for an empty cell or do you mean the literal word nil?

--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
Hi Biff, I think maybe my assumptions of true vs false may be the
problem.
Column Q is either value or 0, column T is either nil or something else
(alpha numeric combinations) row U is 0 - 4. If there is value - more
than
0
in Q and either nil or 0 in T or U columns I want it to to give me the
value
of Q. Currently with the below formulas it gives me the value of Q
whether
U
or T meet my true criteria or not.
"T. Valko" wrote:

=IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q 2)

You don't want to quote numbers: "0"

Try it like this:

=IF(AND(AA2="p",Q2=0,U2=0,T2="nil"),0,Q2)


--
Biff
Microsoft Excel MVP


"Mary-Anne" wrote in message
...
Hi, I'm trying to create an answer using a combination of "and" and
"if"
statements for a number of cells - without success. I've done the
following
formula =IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q2 ). Can
anyone
help
me with what I'm missing to make the formula look for the "true" or
"false"
result across the 4 cells? Thanks








  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF AND functions


Your formula =IF(AND(AA2="p",Q2="0",U2="0",T2="nil"),0,Q2 ) will return
0 if true and the contents of Q2, is this what you want?Mary-Anne;176953 Wrote:
Hi, I'm trying to create an answer using a combination of "and" and
"if"
statements for a number of cells - without success. I've done the
following
formula =IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q2 ). Can
anyone help
me with what I'm missing to make the formula look for the "true" or
"false"
result across the 4 cells? Thanks



--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=48951

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default IF AND functions

yes the problem is that even if T2 and U2 are not equal to 0 - it is giving
me the value of Q2 as the answer

"The Code Cage Team" wrote:


Your formula =IF(AND(AA2="p",Q2="0",U2="0",T2="nil"),0,Q2 ) will return
0 if true and the contents of Q2, is this what you want?Mary-Anne;176953 Wrote:
Hi, I'm trying to create an answer using a combination of "and" and
"if"
statements for a number of cells - without success. I've done the
following
formula =IF(AND(AA2="p",(Q2="0"),(U2="0"),(T2="nil")),0,Q2 ). Can
anyone help
me with what I'm missing to make the formula look for the "true" or
"false"
result across the 4 cells? Thanks



--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=48951


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
Multiple functions, conditional functions HeatherBelle Excel Worksheet Functions 7 October 17th 08 03:57 PM
How to convert cell formula functions to code functions Adnan Excel Discussion (Misc queries) 1 October 1st 08 08:30 PM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Looking for a site with functions that substitute the ATP functions Franz Verga Excel Worksheet Functions 3 June 24th 06 04:30 AM
Nesting functions in the functions dialog box cs170a Excel Worksheet Functions 0 June 10th 05 10:36 PM


All times are GMT +1. The time now is 06:39 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"