How to count values on selected cells in excel(not by VBA)

m_vishal_c

Board Regular
Joined
Dec 7, 2016
Messages
209
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
HI
I do have values like below
Aged Care NameDeptStaff NameDesignationFluCovid 1Covid 2
BabcJohnRN
12/02/2021​
16/08/2021​
AxyzSmithAIN
1/01/2021​
6/02/2021​
6/08/2021​
BaaaaCameliaEN
BgggIssacAIN
4/07/2021​
5/08/2021​

like in Aged care B, according to total Staff members how many % Flu , Covid 1 % and Covid 2 % completed.

so for Aged care B there are total 3 Staffs and only 2 staff got shot of Flu so 2/3=66.67% Flu vaccination completed

There are many Aged care like A to Z. I need to count for all Aged care how many % Flu, % Covid 1, % Covid 2 completed

I just need the formula (not VBA) for Flu, Covid 1 and Covid 2

heaps thanks in Advance.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Thanks for quick reply. What will be the formula for K2 and L2. Do i need to add Aged care names (A,B,C....) manually in column I. Thanks
 
Upvote 0
*Deleted previous post*

Try
Formula in J2 copied across and down

Pasta1
ABCDEFGHIJKL
1Aged Care NameDeptStaff NameDesignationFluCovid 1Covid 2Aged CareFluCovid 1Covid 2
2BabcJohnRN12/02/202116/08/2021A100%100%100%
3AxyzSmithAIN01/01/202106/02/202106/08/2021B67%67%0%
4BaaaaCameliaEN
5BgggIssacAIN04/07/202105/08/2021
6
Plan2
Cell Formulas
RangeFormula
J2:L3J2=COUNTIFS($A$2:$A$5,$I2,E$2:E$5,"<>")/COUNTIF($A$2:$A$5,$I2)


M.
 
Upvote 0
Solution
*Deleted previous post*

Try
Formula in J2 copied across and down

Pasta1
ABCDEFGHIJKL
1Aged Care NameDeptStaff NameDesignationFluCovid 1Covid 2Aged CareFluCovid 1Covid 2
2BabcJohnRN12/02/202116/08/2021A100%100%100%
3AxyzSmithAIN01/01/202106/02/202106/08/2021B67%67%0%
4BaaaaCameliaEN
5BgggIssacAIN04/07/202105/08/2021
6
Plan2
Cell Formulas
RangeFormula
J2:L3J2=COUNTIFS($A$2:$A$5,$I2,E$2:E$5,"<>")/COUNTIF($A$2:$A$5,$I2)


M.
And what about Aged care names in column I. Do i have to enter manually?
 
Last edited by a moderator:
Upvote 0
And what about Aged care names in column I. Do i have to enter manually?

Yes, they are the criteria to be used in the formulas.
Paste the Aged Care Names in column I and go to
Data > Remove duplicates
to create the list

M.
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

For example, if you have Excel 365 you may be able to use this single formula I2?

21 08 17.xlsm
ABCDEFGHIJKL
1Aged Care NameDeptStaff NameDesignationFluCovid 1Covid 2Aged CareFluCovid 1Covid 2
2BabcJohnRN12/02/202116/08/2021A100%100%100%
3AxyzSmithAIN1/01/20216/02/20216/08/2021B67%67%0%
4BaaaaCameliaEN
5BgggIssacAIN4/07/20215/08/2021
Calc %
Cell Formulas
RangeFormula
I2:L3I2=LET(r,A2:A5,u,UNIQUE(r),ca,COUNTIF(r,u),SORT(CHOOSE({1,2,3,4},u,COUNTIFS(r,u,E2:E5,">0")/ca,COUNTIFS(r,u,F2:F5,">0")/ca,COUNTIFS(r,u,G2:G5,">0")/ca)))
Dynamic array formulas.
 
Upvote 0
HI Marcelo Branco, Peter_SSs
I really appreciate your support and it s perfect solution for my query. Thanks a lot
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,593
Members
449,038
Latest member
Arbind kumar

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