How to find product of every other cell

ACSKNIGHTS

New Member
Joined
May 1, 2023
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hello, I am trying to figure out a formula to count True/False check mark boxes in every other column without having to select every other cell in that row. I have multiple rows for a roster of students with enough columns for every school day (roughly 260) on our school calendar where we will be checking boxes according to whether or not the student ate hot lunch (one column) and if they had an extra meal (next column) for each day. I need to keep a running tally of the two separate values for the entire range but they have to be side by side, therefore I need to count every other column. Is there a shorter way to do this other than adding 260 'Countifs' formulas together? Thanks for your feedback!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
i'm not sure how to deal wiht check boxes, but here is what you need to do if check box values are 1's and 0's:

Book4
ABCDEFGHIJKLMNO
1HotDay1ExtraDay1HotDay2ExtraDay2HotDay3ExtraDay3HotDay4ExtraDay4HotDay5ExtraDay5HotDay6ExtraDay6HotTotalHotExtra
2sally10100001101142
3John11011000000123
Sheet10
Cell Formulas
RangeFormula
N2:N3N2=SUM((--(ISEVEN(COLUMN(B2:M2))))*(B2:M2))
O2:O3O2=SUM((--(ISODD(COLUMN(B2:M2))))*(B2:M2))
 
Upvote 0
Welcome to the Forum. You'll get better responses if you post some of your data using XL2BB (and not an image)..

Your subject says "product" but I think you mean "sum".

Without seeing your sample data, here are 2 options (adjust the last column reference in the total columns accordingly):

Book1
ABCDEFGHIJKLMNOPQ
1StudentTotal HotTotal Extrahotextrahotextrahotextrahotextrahotextrahotextra
2AAAAA4300101101001011
3BBBBB2401001001011100
4CCCCC2501010101100110
5DDDD1501001001010101
6
7
8StudentTotal HotTotal Extrahotextrahotextrahotextrahotextrahotextrahotextrahotextra
9AAAAA43NONOYESNOYESYESNOYESNONOYESNOYESYES
10BBBBB24NOYESNONOYESNONOYESNOYESYESYESNONO
11CCCCC25NOYESNOYESNOYESNOYESYESNONOYESYESNO
12DDDD15NOYESNONOYESNONOYESNOYESNOYESNOYES
Sheet5
Cell Formulas
RangeFormula
B2:B5B2=SUMPRODUCT((MOD(COLUMN($D1:$Q1),2)=0)*($D2:$Q2))
C2:C5C2=SUMPRODUCT((MOD(COLUMN($D1:$Q1),2)=1)*($D2:$Q2))
B9:B12B9=SUMPRODUCT((MOD(COLUMN($D8:$Q8),2)=0)*($D9:$Q9="YES"))
C9:C12C9=SUMPRODUCT((MOD(COLUMN($D8:$Q8),2)=1)*($D9:$Q9="YES"))
 
Upvote 0
i'm not sure how to deal wiht check boxes, but here is what you need to do if check box values are 1's and 0's:

Book4
ABCDEFGHIJKLMNO
1HotDay1ExtraDay1HotDay2ExtraDay2HotDay3ExtraDay3HotDay4ExtraDay4HotDay5ExtraDay5HotDay6ExtraDay6HotTotalHotExtra
2sally10100001101142
3John11011000000123
Sheet10
Cell Formulas
RangeFormula
N2:N3N2=SUM((--(ISEVEN(COLUMN(B2:M2))))*(B2:M2))
O2:O3O2=SUM((--(ISODD(COLUMN(B2:M2))))*(B2:M2))
if you get an error using SUM, it will also work with SUMPRODUCT.
 
Upvote 0
i'm not sure how to deal wiht check boxes, but here is what you need to do if check box values are 1's and 0's:

Book4
ABCDEFGHIJKLMNO
1HotDay1ExtraDay1HotDay2ExtraDay2HotDay3ExtraDay3HotDay4ExtraDay4HotDay5ExtraDay5HotDay6ExtraDay6HotTotalHotExtra
2sally10100001101142
3John11011000000123
Sheet10
Cell Formulas
RangeFormula
N2:N3N2=SUM((--(ISEVEN(COLUMN(B2:M2))))*(B2:M2))
O2:O3O2=SUM((--(ISODD(COLUMN(B2:M2))))*(B2:M2))
I might have to consider changing it to 0's/1's. Thank you for your help!
 
Upvote 0
Welcome to the Forum. You'll get better responses if you post some of your data using XL2BB (and not an image)..

Your subject says "product" but I think you mean "sum".

Without seeing your sample data, here are 2 options (adjust the last column reference in the total columns accordingly):

Book1
ABCDEFGHIJKLMNOPQ
1StudentTotal HotTotal Extrahotextrahotextrahotextrahotextrahotextrahotextra
2AAAAA4300101101001011
3BBBBB2401001001011100
4CCCCC2501010101100110
5DDDD1501001001010101
6
7
8StudentTotal HotTotal Extrahotextrahotextrahotextrahotextrahotextrahotextrahotextra
9AAAAA43NONOYESNOYESYESNOYESNONOYESNOYESYES
10BBBBB24NOYESNONOYESNONOYESNOYESYESYESNONO
11CCCCC25NOYESNOYESNOYESNOYESYESNONOYESYESNO
12DDDD15NOYESNONOYESNONOYESNOYESNOYESNOYES
Sheet5
Cell Formulas
RangeFormula
B2:B5B2=SUMPRODUCT((MOD(COLUMN($D1:$Q1),2)=0)*($D2:$Q2))
C2:C5C2=SUMPRODUCT((MOD(COLUMN($D1:$Q1),2)=1)*($D2:$Q2))
B9:B12B9=SUMPRODUCT((MOD(COLUMN($D8:$Q8),2)=0)*($D9:$Q9="YES"))
C9:C12C9=SUMPRODUCT((MOD(COLUMN($D8:$Q8),2)=1)*($D9:$Q9="YES"))
Thank you for the feedback. I will try to post a photo next time. Those two options are definitely worth considering...the check boxes are just so quick and convenient, but we might have to consider a numerical or text option. Thank you for your help!
 
Upvote 0
do not post photos if you can post a table of data. A mini worksheet with the xl2bb add in is BY FAR the most effective way to get help from the forum.
photos do almost nothing.


Thank you for the feedback. I will try to post a photo next time. Those two options are definitely worth considering...the check boxes are just so quick and convenient, but we might have to consider a numerical or text option. Thank you for your help!
 
Upvote 1
I think check boxes send values to associated cells, but that mean you need to create a lot of check boxes.

If you do, you just need to know what the checkbox values are and what column they go in.
 
Upvote 0
Thank you for the feedback. I will try to post a photo next time. Those two options are definitely worth considering...the check boxes are just so quick and convenient, but we might have to consider a numerical or text option. Thank you for your help!
How are the check boxes inserted in the cells? Are they from a Form Control or ActiveX?

Please don't post a photo...use XL2BB.
 
Upvote 0

Forum statistics

Threads
1,215,159
Messages
6,123,346
Members
449,097
Latest member
thnirmitha

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