Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Formula help

Posted on 2011-09-26
7
Medium Priority
?
163 Views
Last Modified: 2012-05-12
Hello,

Can someone please explain to me how I would get the following?

On the attached spreadsheet I have some data that I would like to add together.
I would like to count for example both column A and column H as one if they both say “Yes”
Would this be an IF statement?
 example.xlsx
0
Comment
Question by:vegas86
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 50
ID: 36640608
Hello,

if you want to return a 1 if both column A and H in a given row equals Yes, then use in row 2

=IF(AND(A2="yes",H2="yes"),1,0)

copy down.

cheers, teylyn
0
 

Author Comment

by:vegas86
ID: 36644130
Hey Teylyn,

Sorry I worded that wrong. What you did is perfect but is there any chance i can do the entire columns at once? so count how many rows that have yes is both columns A and H and return a number?
0
 
LVL 26

Expert Comment

by:redmondb
ID: 36645596
... or, if you're trying to count Yes's but treat A and H as one then...

=COUNTIF(A2:M2,"Yes")-AND(A2="Yes",H2="Yes")

Please see attached.

Regards,
Brian.
example-V3.xlsx
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 61

Expert Comment

by:HainKurt
ID: 36647579
N1: BothYes
N2: =IF(AND(A2="Yes", H2="Yes"),1,0)
Copy down

O1:Total
O2:==SUM(N:N)

you can hide column N if you wish
0
 
LVL 61

Expert Comment

by:HainKurt
ID: 36647762
here how it works...
example.xlsx
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 36648356
You can use countifs()

=COUNTIFS(A:A,"yes",H:H,"yes")

cheers, teylyn
0
 

Author Closing Comment

by:vegas86
ID: 36669249
Thanks for all your help and suggestions guys. Thank you Teylyn the countif was exactly what i needed!
0

Featured Post

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!

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

782 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