Formulas for counting different criteria

desuth

New Member
Joined
Dec 5, 2017
Messages
21
Office Version
  1. 2016
gogononogo and gono and nogo and nono and go
nononono3412
gogonono
gogonogo
gononogo

<tbody>
</tbody>

I am trying to get the formulas for the go and go, no and no, go and no, no and go.

I'm not sure of how to get the formula to count between the different criteria.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
gogononogo and gono and nogo and nono and go
nononono
gogonono
gogonogo
gononogo

<tbody>
</tbody>

Assuming the cell containing "go and go" is G1, with blanks in columns C and E, this is the formula I inserted to G2:

=SUM(N(CHOOSE({1,2},--($A$1:$A$5&" and "&$B$1:$B$5=G$1),--($D$1:$D$5&" and "&$E$1:$E$5=G$1))>0))

Using Control Shift Enter.

Let me know if there are any questions or concerns.
 
Upvote 0
Hi,

This worked for me;


Book1
ABCDEFGH
1gogononogogononogononogo
2nononono3412
3gogonono
4gogonogo
5gononogo
Sheet1
Cell Formulas
RangeFormula
E2=SUMPRODUCT(($A$1:$A$5&$B$1:$B$5=E$1)+($C$1:$C$5&$D$1:$D$5=E$1)*1)
F2=SUMPRODUCT(($A$1:$A$5&$B$1:$B$5=F$1)+($C$1:$C$5&$D$1:$D$5=F$1)*1)
G2=SUMPRODUCT(($A$1:$A$5&$B$1:$B$5=G$1)+($C$1:$C$5&$D$1:$D$5=G$1)*1)
H2=SUMPRODUCT(($A$1:$A$5&$B$1:$B$5=H$1)+($C$1:$C$5&$D$1:$D$5=H$1)*1)
 
Upvote 0
I figured out how to make my solution presentation look a little better.



ABCDEFGHIJKLM
1gogononogo and gono and nogo and nono and go
2nononono3412
3gogonono3412
4gogonogo
5gononogo

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
G3{=SUM(N(CHOOSE({1,2},--($A$1:$A$5&" and "&$B$1:$B$5=G$1),--($D$1:$D$5&" and "&$E$1:$E$5=G$1))>0))}
I3{=SUM(N(CHOOSE({1,2},--($A$1:$A$5&" and "&$B$1:$B$5=I$1),--($D$1:$D$5&" and "&$E$1:$E$5=I$1))>0))}
K3{=SUM(N(CHOOSE({1,2},--($A$1:$A$5&" and "&$B$1:$B$5=K$1),--($D$1:$D$5&" and "&$E$1:$E$5=K$1))>0))}
M3{=SUM(N(CHOOSE({1,2},--($A$1:$A$5&" and "&$B$1:$B$5=M$1),--($D$1:$D$5&" and "&$E$1:$E$5=M$1))>0))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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