Formula Required To count names and Ticks

Arts

Well-known Member
Joined
Sep 28, 2007
Messages
765
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi all

I have an attendance tracker for which I need to count the individual who has attended which is in the form of a tick but if this individual sends a replacement I then need it to count the name (each entry represents a month so the below would be showing Jan, Feb, Mar).

But if the regular attendee can't attend and a representative can't attend this is shown as a cross and do not need this counted. example below: For the below I would need the count to be 2.

The reason for this is to get an average for the year for attendance. I got as far as adding a countif(s) to count the tick but wasn't sure how to count a name.

1649937475416.png


Many thanks
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
@Arts Maybe try Sumproduct along these lines?

Book2
BCDEFGHIJK
1CountJanFebMarAprMayJunJulAug
25xTom WhiteYxYFred SmithY
Sheet2
Cell Formulas
RangeFormula
B2B2=SUMPRODUCT((D2:O2 ="Y")+(LEN(D2:O2)>2))
 
Upvote 0
@Arts Maybe try Sumproduct along these lines?

Book2
BCDEFGHIJK
1CountJanFebMarAprMayJunJulAug
25xTom WhiteYxYFred SmithY
Sheet2
Cell Formulas
RangeFormula
B2B2=SUMPRODUCT((D2:O2 ="Y")+(LEN(D2:O2)>2))

Thank you this does the trick!! I'm not familiar with this function at all but will look into it. Would you be kind enough to explain why this would be the "better" option as I was going down the route of multiple countifs. I also noted that at first I only used the one parenthesis when doing sum product and this gave me an error are two always required when using this function? Sorry for all the questions wanting to get as much knowledge as possible.
 
Upvote 0
@Arts You could do it using Countif.
Book2
BCDEFGHIJK
1CountJanFebMarAprMayJunJulAug
25xTom WhiteYxYFred SmithY
Sheet2
Cell Formulas
RangeFormula
B2B2=COUNTIF(D2:O2,"Y")+COUNTIF(D2:O2,"??*")


Re Sumproduct: If you Google you will see that it does what it says on the tin and sums the product of a series of similar sized arrays.
You can use mathematical operators *, /, +, - If purely numeric data then you can get a result from a single array.
When you use it for testing an array against conditions, you get resulting TRUE or FALSE arrays. If it's just a single array then it will not resolve to a number if it is not subject to mathematical operation eg with a second array or value. Typically, the * operator acts a AND and + acts as OR. You have a lot of scope as to the functions that you can use to test your conditions. A lot of which you could not test when using other functions, eg Countif.
However, Google is your friend.
Hope that helps.
 
Upvote 0
Solution
@Arts You could do it using Countif.
Book2
BCDEFGHIJK
1CountJanFebMarAprMayJunJulAug
25xTom WhiteYxYFred SmithY
Sheet2
Cell Formulas
RangeFormula
B2B2=COUNTIF(D2:O2,"Y")+COUNTIF(D2:O2,"??*")


Re Sumproduct: If you Google you will see that it does what it says on the tin and sums the product of a series of similar sized arrays.
You can use mathematical operators *, /, +, - If purely numeric data then you can get a result from a single array.
When you use it for testing an array against conditions, you get resulting TRUE or FALSE arrays. If it's just a single array then it will not resolve to a number if it is not subject to mathematical operation eg with a second array or value. Typically, the * operator acts a AND and + acts as OR. You have a lot of scope as to the functions that you can use to test your conditions. A lot of which you could not test when using other functions, eg Countif.
However, Google is your friend.
Hope that helps.
I was going down the google route but thought if you could give me the "highlights" as you have done would be very helpful and that it is. Thank you so much for this.
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,381
Members
448,888
Latest member
Arle8907

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