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

Hi, I need to check on 2 columns to give me the following.
If G2 <= 0 and P2 < 12 "do nothing".
If G2 <=0 and P2 = 12 "incorrect"
If G2 0 and P2 = 12 "correct"
Here is my formula, but it does not work. I am sure missing something but I
cannot see it.
=IF($G2<=0,IF(AND($P2<12),"do
nothing",IF(AND($P2=12),"incorrect","correct")))
Thanks, Lupe
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default IF AND statement

=IF(AND(G2<=0,P2=12),"incorrect",IF(AND(G20,P2=12 ),"correct",""))


"Lupe" wrote:

Hi, I need to check on 2 columns to give me the following.
If G2 <= 0 and P2 < 12 "do nothing".
If G2 <=0 and P2 = 12 "incorrect"
If G2 0 and P2 = 12 "correct"
Here is my formula, but it does not work. I am sure missing something but I
cannot see it.
=IF($G2<=0,IF(AND($P2<12),"do
nothing",IF(AND($P2=12),"incorrect","correct")))
Thanks, Lupe

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

Let's see
if(g2<=0,cond1,cond2)
cond1 if(p2=12,"i","")
cond2 if(p2=12,"c","")

OR keys on p2 first

=IF(p2=12,IF(g2<=0,"i","c"),"")
--
Don Guillett
SalesAid Software

"Lupe" wrote in message
...
Hi, I need to check on 2 columns to give me the following.
If G2 <= 0 and P2 < 12 "do nothing".
If G2 <=0 and P2 = 12 "incorrect"
If G2 0 and P2 = 12 "correct"
Here is my formula, but it does not work. I am sure missing something but
I
cannot see it.
=IF($G2<=0,IF(AND($P2<12),"do
nothing",IF(AND($P2=12),"incorrect","correct")))
Thanks, Lupe



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

Thanks you Teethless mama.
I have added and changed it a little bit to better reflect what we needed
and it works:
=IF(AND($G3<=0,$P3=12),"change to
01",IF(AND($G30,$P3=12),"correct",IF(AND($G30,$P 3<12),"change to 12","do
nothing")))

"Teethless mama" wrote:

=IF(AND(G2<=0,P2=12),"incorrect",IF(AND(G20,P2=12 ),"correct",""))


"Lupe" wrote:

Hi, I need to check on 2 columns to give me the following.
If G2 <= 0 and P2 < 12 "do nothing".
If G2 <=0 and P2 = 12 "incorrect"
If G2 0 and P2 = 12 "correct"
Here is my formula, but it does not work. I am sure missing something but I
cannot see it.
=IF($G2<=0,IF(AND($P2<12),"do
nothing",IF(AND($P2=12),"incorrect","correct")))
Thanks, Lupe

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

Don,
I'm leaving the office at the moment but I will check tomorrow whether this
statement also works for me.
Thanks, Lupe

"Don Guillett" wrote:

Let's see
if(g2<=0,cond1,cond2)
cond1 if(p2=12,"i","")
cond2 if(p2=12,"c","")

OR keys on p2 first

=IF(p2=12,IF(g2<=0,"i","c"),"")
--
Don Guillett
SalesAid Software

"Lupe" wrote in message
...
Hi, I need to check on 2 columns to give me the following.
If G2 <= 0 and P2 < 12 "do nothing".
If G2 <=0 and P2 = 12 "incorrect"
If G2 0 and P2 = 12 "correct"
Here is my formula, but it does not work. I am sure missing something but
I
cannot see it.
=IF($G2<=0,IF(AND($P2<12),"do
nothing",IF(AND($P2=12),"incorrect","correct")))
Thanks, Lupe




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
SQL concatenation statement CLamar Excel Discussion (Misc queries) 0 June 29th 06 01:58 PM
reconcile two months statement? achilles Excel Discussion (Misc queries) 0 March 17th 06 03:47 AM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM


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