Macro to count the answers in a table
Closed
theinvictus
TrowaD
- Posts
- 2
- Registration date
- Sunday February 3, 2013
- Status
- Member
- Last seen
- February 4, 2013
TrowaD
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Related:
- Macro to count the answers in a table
- Macro for counting duplicates in raw ✓ - Forum - Excel
- PHP - Linking MySQL tables and counting results ✓ - Forum - Programming
- Count if macro on multiple criteria ✓ - Forum - Excel
- Excel macro add data to bottom of table ✓ - Forum - Excel
- Excel Macro to insert a new row ✓ - Forum - Excel
3 replies
rizvisa1
Feb 3, 2013 at 06:46 PM
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
Feb 3, 2013 at 06:46 PM
Is this output on a new sheet. are all groups to be on same sheet ?
theinvictus
Feb 4, 2013 at 05:48 PM
- Posts
- 2
- Registration date
- Sunday February 3, 2013
- Status
- Member
- Last seen
- February 4, 2013
Feb 4, 2013 at 05:48 PM
Hi rizvisa1, it will be good if the output will be on a new sheet. Is it possible to name the sheet as Type A/B/C/D respectively? Thank you very much! :)
TrowaD
Feb 5, 2013 at 10:59 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Feb 5, 2013 at 10:59 AM
Hi Theinvictus,
This can also be done using array formula's.
Range A1:E12 is used for your example data.
To get Type A Q1 number of T's:
=SUM(($A$2:$A$12="Type A")*($B$2:$B$12="T"))
To get Type A Q1 number of F's:
=SUM(($A$2:$A$12="Type A")*($B$2:$B$12="F"))
To get Type A Q2 number of T's:
=SUM(($A$2:$A$12="Type A")*($C$2:$C$12="T"))
To get Type A Q2 number of F's:
=SOM(($A$2:$A$12="Type A")*($C$2:$C$12="F"))
etc...
Keep in mind that array formula's needs to be confirmed by hitting Ctrl+Shift+Enter.
Best regards,
Trowa
This can also be done using array formula's.
Range A1:E12 is used for your example data.
To get Type A Q1 number of T's:
=SUM(($A$2:$A$12="Type A")*($B$2:$B$12="T"))
To get Type A Q1 number of F's:
=SUM(($A$2:$A$12="Type A")*($B$2:$B$12="F"))
To get Type A Q2 number of T's:
=SUM(($A$2:$A$12="Type A")*($C$2:$C$12="T"))
To get Type A Q2 number of F's:
=SOM(($A$2:$A$12="Type A")*($C$2:$C$12="F"))
etc...
Keep in mind that array formula's needs to be confirmed by hitting Ctrl+Shift+Enter.
Best regards,
Trowa