Solved

Excel if coumn N = 1 and Column O = 0 then....

Posted on 2013-12-13
7
184 Views
Last Modified: 2014-01-29
Hi All,

Im tryign to search a colum to find out if it contains a value.

My theroy is to seach column N to see if it contains "1" if it does search Column O to see if anything the 1 contians a 0 in column O

I tried this but throws an error...

=IF(Result!N2:N1000=”1”,(If(Result!o2:o1000=”0”,Yes,No))

Open in new window



Example would be
*************
N O
1  1
1  4
1  1
2  0
********
The above would return no as N contains no 0's IN column O where coumn N = 1

*************
N O
1  1
1  0
1  1
2  0
********
The above would return yes as N contains no a 0 IN column O where coumn N = 1
0
Comment
Question by:runnerjp2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39716407
Try

=sumproduct((n2:n1000=1)*(o2:o1000=0)*1)
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39716418
If you have 2007 or later then you can also try

=COUNTIFS(O2:O1000,0,N2:N1000,35)

That should give you the number of lines found. If you just need a yes or no then try

=if(COUNTIFS(O2:O1000,0,N2:N1000,35),"Yes","No")
0
 
LVL 11

Expert Comment

by:Angelp1ay
ID: 39716644
I think your 35 should be a 1??
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39716726
You are right
0
 

Expert Comment

by:TAOSA-Admin
ID: 39716727
IF(logical test, value if true, value if false)

=IF1(logical test1 Result!N2:N1000=”1”,value if true1(If2(logical test 2Result!o2:o1000=”0”,value if true 2 Yes,value if false 2 No), value if false1)

You appear to have no value if false for the outer IF statement and a missing trailing close parenthesis.  Every left (open parenthesis) shoudl have a matching right (close parenthesis).  You have three lefts and two rights.
0
 

Author Comment

by:runnerjp2005
ID: 39716978
I did =IF(COUNTIFS(O2:O1000,0,N2:N1000,1),"Yes","No")

but it says no when it should say yes!!!

Aaatched is the sheet
J.P.B.S.xlsx
0
 
LVL 11

Accepted Solution

by:
Angelp1ay earned 500 total points
ID: 39717071
Two problems:

Your references are wrong. You moved the formula to a different sheet. You need to change the formula to point to the Result sheet:
=IF(COUNTIFS(Result!O2:O1000,0,Result!N2:N1000,1),"Yes","No")

Open in new window


By your logic in the sheet you posted it actually should say no (you don't have any 0s in col O next to 1s in col N).

With the references corrected, when I put a 0 in col O it does switch to Yes.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question