Silly Question But Stuck

JALonsdale

New Member
Joined
Jul 29, 2017
Messages
6
I want to calculate two cells based on the number of items I have within sixteen columns on each row.



04
06
08
10
12
14
16
18
20

Next
Total
Line1xxxx12Should Be 28
Line2xx08Should be 10
Line3xxxxx14Should be 40

<tbody>
</tbody>

I have figured out the formula in blue as it was rather simple...
Code:
=(((COUNTA(b2:b10)*2)+4)

But updating the Total Column is proving more of a challenge.
In this chart there is a line in orange, that cannot be a part of the finished product... Therefore how can I update the total
based on the fact that the first check box value is 4, and it increases each time by 2; without having the 4,6,8,10,12,etc... line in it.

Any feedback would be of much help.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Looks like
Code:
=(COUNTA(B2:K2)*2 )+ 4
in M2 and
Code:
=SUM(B2:K2)+M2
in N2 based on sample.
 
Last edited:
Upvote 0
A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
K​
L​
M​
N​
1​
04​
06​
08​
10​
12​
14​
16​
18​
20​
NextTotal
2​
Line1
x​
x​
x​
x​
28​
M2: =SUMPRODUCT((B2:J2 = "x") * $B$1:$J$1)
3​
Line2
x​
x​
10​
4​
Line3
x​
x​
x​
x​
x​
40​
 
Upvote 0
Looks like
Code:
=(COUNTA(B2:K2)*2 )+ 4
in M2 and
Code:
=SUM(B2:K2)+M2
in N2 based on sample.

Here's what's going on. The first box adds a value of 4, then the next value adds 6, then 8, then 10 and so fourth.

Like I said however, the orange line cannot be in the final product. I'm not sure if I should do a if case tier or sumproduct something.

04
06
08
10
12
14
16
18
20

Next
Total
Line1xxxx12Should Be 28
Line2xx08Should be 10
Line3xxxxx14Should be 40

<tbody>
</tbody>

04 + 06 + 08 + 10 is 28, that's how I got that number on line 1.
04 + 06 should be on line 2, 10.
and then the final line is 40, as 4 + 6 + 8 + 10 +12 = 40.
 
Upvote 0

Forum statistics

Threads
1,216,725
Messages
6,132,348
Members
449,719
Latest member
excel4mac

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