cumulative sum of even or odd rows

shorouqelsobkey

New Member
Joined
Nov 23, 2015
Messages
30
I need a formula to cumulatively sum the even rows or columns.

Example:

A B
10 10
20 20
60 70
75 95
 
It returns TRUE, they're all numbers, but the problem is that i only have one column and the other columns appear with a macro, so i can't write a function in the columns which appear by the macro , so i just write it in the reference column and when the column is repeated it copy the function to all the repeated columns.
Overall i can't type it manually i need a formula.
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
The sumproduct should be fine then.
=SUMPRODUCT(--(MOD(COLUMN($F35:F35),2)=MOD(COLUMN(F35),2)),$F35:F35)

It will return #Value if F35 is blank (or non numeric value).
But as soon as F35 is populated with a number, then you can use your macro to fill the formula to the right as needed.
 
Upvote 0
ok i understand its working good it said #VALUE! because the cell was blank, Thank you very much. but i have another problem that when the column is repeated it change the cells of the formula to the new column and am okay with that, but there's a cell that i want it to be constant for all columns.

EXAMPLE:
formula If(D4=1,Sum(A5)

When the macro is repeated A5 change to B5 and thats right but also D4 is changed to E4 and i want it to say D4, Is there any solution ??
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,693
Members
449,048
Latest member
81jamesacct

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