Counting "tallies" in different columns without repeat

bobaaholic

New Member
Joined
Aug 4, 2021
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
Hi everyone, I'm not sure if this has been posted before but I couldn't find anything on it. I'm working on a project with characteristics being marked with two letters to indicated morning or evening for different columns and I'd like to count the cells without double-counting cells with related characteristics. I'd also like I've tried a few variations of COUNTIF but haven't really been able to figure it out.

For example, I'd like to count the number of people using Drug X or Drug Z. There are 3 people using Drug X and one person is using Drug X and Drug Z but I'd like to only count them as 3 people (instead of 4 non-empty cells for Drug X and Drug Z). Also I'd like to count the cells only with M. Hope that made sense!

Drug.xlsx
ABCD
1NameDrug XDrug YDrug Z
2BethME
3AmyM
4ConnorME
Sheet2
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
NVM did not read the whole post
 
Upvote 0
Is thtis on the right track
Book1
ABCDE
1NameDrug XDrug YDrug Z
2BethME1
3AmyM1
4ConnorME1
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=IF(COUNTA(B2:D2)>0,1,"")
 
Upvote 0
Is this what yo want?
Book1
ABCD
1NameDrug XDrug YDrug Z
2BethME
3AmyM
4ConnorMe
5
6
73
Sheet1
Cell Formulas
RangeFormula
B7B7=SUMPRODUCT(($B$2:$B$4="m")+($D$2:$D$4="m"))-SUMPRODUCT(($B$2:$B$4="m")*($D$2:$D$4="m"))
 
Upvote 0
Is thtis on the right track
Book1
ABCDE
1NameDrug XDrug YDrug Z
2BethME1
3AmyM1
4ConnorME1
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=IF(COUNTA(B2:D2)>0,1,"")
Sort of.
Book1
ABCD
1NameDrug XDrug YDrug Z
2BethME
3AmyM
4ConnorMe
5
6
73
Sheet1
Cell Formulas
RangeFormula
B7B7=SUMPRODUCT(($B$2:$B$4="m")+($D$2:$D$4="m"))-SUMPRODUCT(($B$2:$B$4="m")*($D$2:$D$4="m"))
Yes! This worked for me, thank you!
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,734
Members
449,094
Latest member
dsharae57

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