Getting a total for everyother row

Aladin Akyurek said:
NBVC said:
Try these:

For even rows: =SUM(IF(MOD(ROW(A1:A100),2)=0,A1:A100))

For odd rows: =SUM(IF(MOD(ROW(A1:A100),2)=1,A1:A100))

Formulas must be confirmed with Ctrl+Shift+Enter, not just Enter.

Adjust ranges to suit.

Insert a row before the current row 1...

I think I see what you are saying, so it would be assumed that no rows are inserted above the range, and if rows are inserted above or below the range, the range in the formulas must be adjusted.

Correct me if I am wrong, but I tried your formula, Aladin and when inserting a row above, I get the same issue.


Did I understand your comment correctly, then?
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
NBVC said:
Aladin Akyurek said:
NBVC said:
Try these:

For even rows: =SUM(IF(MOD(ROW(A1:A100),2)=0,A1:A100))

For odd rows: =SUM(IF(MOD(ROW(A1:A100),2)=1,A1:A100))

Formulas must be confirmed with Ctrl+Shift+Enter, not just Enter.

Adjust ranges to suit.

Insert a row before the current row 1...

I see what you are saying, so it would be assumed that no rows are inserted above the range, and if rows are inserted above or below the range, the range in the formulas must be adjusted...

Nothing has to be assumed if you use the formula(s) I posted.
 
Upvote 0
Aladin Akyurek said:
Nothing has to be assumed if you use the formula(s) I posted.

I guess I don't get it, then. If you insert a row above A3 and use your formula, I get a similar issue. The top of the range in your formulas change to A4 and now don't include A3.
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,387
Members
449,445
Latest member
JJFabEngineering

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