• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

Formula help

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
vegas86
Asked:
vegas86
  • 2
  • 2
  • 2
  • +1
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
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
 
vegas86Author Commented:
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
 
redmondbCommented:
... 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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
HainKurtSr. System AnalystCommented:
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
 
HainKurtSr. System AnalystCommented:
here how it works...
example.xlsx
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
You can use countifs()

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

cheers, teylyn
0
 
vegas86Author Commented:
Thanks for all your help and suggestions guys. Thank you Teylyn the countif was exactly what i needed!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now