Help with totals list based on criteria (COUNTIF?)

Guitarmageddon

Board Regular
Joined
Dec 22, 2014
Messages
159
Hello all,
Im having trouble figuring out what is probably a simple counting function. I have a weight lifting log that I've made for myself. Within it, I classify the various lifts underneath the broader muscle groups they fall under. For example, squats work the "quads" and a row may work the "back" and so forth. I have a totals list that is meant to count all the sets I do during a week, at the bottom starting in row 48.

Columns H:M are the recorded reps for each set that I do.

All I really need to do is for the list at the bottom to reference the muscle group name, check column B for that name, and then count any non-blank cell for that corresponding lift. It should look across the training days of that week.

For example, in the picture attached, QUAD should count up to be 14, because I have recorded 14 completed sets across the days. Better yet, in case I get lazy and record text notes in any of those cells rather than my designated notes column, can we make it just count cells that are NUMBERS only? In my head this is like some countif/vlook type thing....

Thanks for any help.
 

Attachments

  • weight log help.PNG
    weight log help.PNG
    37.4 KB · Views: 7

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
could you explain how do you get to the 14 in your example, i.e. cells that added up to it.
 
Upvote 0
could you explain how do you get to the 14 in your example, i.e. cells that added up to it.
Hello! Yes, so at the bottom, looking for the totals of all QUAD workouts.... the columns within my blue SETS area (H thru M) have multiple days which I performed QUAD lifts.

So finding QUAD within day 1 thru 7 in column B, I then look over and see that I performed a count of 14 total sets. The actual repetition number within those cells is irrelevant to me. I just want to count how many sets were performed. So that would be rows 6 (3 sets), 7 (4 sets) , 25 (3 sets), and row 26 (4 sets). Does this make sense?
 
Upvote 0
an easy way is to use a helper column like this

Book1
ABCDEFGHIJK
1Day 1Quad10X1
28X1
3X0
4X0
5X0
6Day 2X0
7Day 3X0
8Day 4Quad88X2
9Day 5X0
10Day 6X0
11Day 7Quad12X1
12
13
14
15
16
17Quad4
Sheet2
Cell Formulas
RangeFormula
K1:K11K1=COUNT(E1:J1)
C17C17=SUMPRODUCT(K1:K11*--(B1:B11=B17))
 
Upvote 0
Entered where you wish the results to be this would work.

=SUMIF(B6:B42,"QUAD",H6:H42)+SUMIF(B6:B42,"QUAD",I6:I42)+SUMIF(B6:B42,"QUAD",J6:J42)+SUMIF(B6:B42,"QUAD",K6:K42)+SUMIF(B6:B42,"QUAD",L6:L42)+SUMIF(B6:B42,"QUAD",M6:M42)
 

Attachments

  • 1578405287363.png
    1578405287363.png
    470 bytes · Views: 3
Upvote 0
Entered where you wish the results to be this would work.

=SUMIF(B6:B42,"QUAD",H6:H42)+SUMIF(B6:B42,"QUAD",I6:I42)+SUMIF(B6:B42,"QUAD",J6:J42)+SUMIF(B6:B42,"QUAD",K6:K42)+SUMIF(B6:B42,"QUAD",L6:L42)+SUMIF(B6:B42,"QUAD",M6:M42)
Hello, this does work, but it is rather summing the total of repetitions that I record, rather than purely counting each box as ONE set. Does that make sense? So its basically asking "are there numbers within the cell? if so, thats one set performed" and Im interesting in simply counting those sets.
 
Upvote 0
I ended up going with the helper column from @AlanY for now. Its nice to have it all rolled up into one though, maybe because of the challenge haha
 
Upvote 0
Hi,

Makes perfect sense, my bad for misinterpreting your desired result. As long as you have it all sorted now.
 
Upvote 0
Hi,

Makes perfect sense, my bad for misinterpreting your desired result. As long as you have it all sorted now.
Thanks a lot. Is this something that an array formula would have been able to wrap into one clean cell? I am not familiar with those and thy are a bit intimidating. I should familiarize myself with those however. My brain power has been so geared on understanding power pivot these days!
 
Upvote 0
I ended up going with the helper column from @AlanY for now. Its nice to have it all rolled up into one though, maybe because of the challenge haha

another way without the helper column

Book1
ABCDEFGHIJ
1Day 1Quad10X
28X
3X
4X
5X
6Day 2X
7Day 3X
8Day 4Quad88X
9Day 5X
10Day 6X
11Day 7Quad12X
12
13
14
15
16
17Quad4
Sheet1
Cell Formulas
RangeFormula
C17C17=SUMPRODUCT((B1:B11=B17)*(E1:J11>0)*(ISNUMBER(E1:J11)))
 
Upvote 0

Forum statistics

Threads
1,216,073
Messages
6,128,634
Members
449,460
Latest member
jgharbawi

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