Help with IF AND?

sammipd

Board Regular
Joined
Jun 6, 2010
Messages
69
I need to answer the question " How many who were referred (Yes) had at least one test (x)" on a tab separate from the data tab.
I'm working with a data tab (1000+ lines) and a reporting tab. Using =IF(AND(A2="yes",B2:E2<>""),"Referred to Test","") on the data tab will tell me which lines meet the criteria, however, using that formula from the reporting tab pointing to the data tab results in a #Value! error. And it doesn't answer my question. How can I get a total number of all 1000+ lines of data who were referred with at least one test? Can you help? Thanks!
 

Attachments

  • CHRS TEST2.jpg
    CHRS TEST2.jpg
    53.5 KB · Views: 11

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
You can use a helper column in f with the formula: =IF(A2="yes",COUNTIF(B2:E2,"x"),0)

Then you can sum(F:F) in another cell
 
Upvote 0
Oops, you want number of people who were yes with at least 1, use this formula instead: =IF(A2="yes",COUNTIF(B2:E2,"x")>0)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top