Countif formula help

aryanaveen

Board Regular
Joined
Jan 5, 2015
Messages
104
Hi Guys,

can you please help me with below report, I need a formula in "Analysis table" which will count number of WFH, PL, UL, SL based on "Report" table. I need count based on criteria Name and Days of week.

For ex - I need a formula which will show me count of "SL" for Mr. A on Monday, Tuesday, Wednesday......

[TABLE="class: outer_border, width: 563"]
<colgroup><col><col span="4"><col span="8"></colgroup><tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Report[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Names[/TD]
[TD]Mr. A[/TD]
[TD]Mr. B[/TD]
[TD]Mr. C[/TD]
[TD]Mr. D[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Monday[/TD]
[TD]11-8[/TD]
[TD]7-4[/TD]
[TD]7-4[/TD]
[TD]7-4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Tuesday[/TD]
[TD]11-8[/TD]
[TD]7-4[/TD]
[TD]7-4[/TD]
[TD]7-4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Wednesday[/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[TD]PL[/TD]
[TD]UL[/TD]
[TD]SL[/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]Monday[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]Tuesday[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD]Wednesday[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD]Thursday[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD]Friday[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi,

Try this:


Book1
ABCDEFGHIJKLM
1Report
2NamesMr. AMr. BMr. CMr. D
3Monday11-aug7-apr7-apr7-apr
4Tuesday11-aug7-apr7-apr7-apr
5WednesdaySL7-apr7-apr7-apr
6Thursday7-apr7-aprUL7-apr
7Friday7-apr7-apr7-apr7-apr
8MondaySLPL7-apr11-aug
9Tuesday7-apr7-apr7-apr11-aug
10WednesdayWFH7-apr7-aprWFH
11Thursday7-aprSL7-apr7-apr
12Friday7-apr7-apr7-apr7-apr
13
14
15Analysis
16
17Mr. AMr. BMr. C
18DaysWFHPLULSLWFHPLULSLWFHPLULSL
19Monday000101000000
20Tuesday000000000000
21Wednesday100100000000
22Thursday000000010010
23Friday000000000000
Sheet1
Cell Formulas
RangeFormula
B19=SUMPRODUCT(($B$2:$E$2=$B$17)*($A$3:$A$12=$A19)*($B$3:$E$12=B$18))
F19=SUMPRODUCT(($B$2:$E$2=$F$17)*($A$3:$A$12=$A19)*($B$3:$E$12=F$18))
J19=SUMPRODUCT(($B$2:$E$2=$J$17)*($A$3:$A$12=$A19)*($B$3:$E$12=J$18))
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

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