sum values on even row numbers

Chris Davison

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,790
Morning all,

I thought this would be a 2-minute formula but it's eluded me this morning

Range A1 to A20 contains values

I just want a single formula that will sum those sitting on even row numbers

many thanks
Chris
:)
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
G'Day Derek,

yeah, my ranges are actually a lot bigger, so ideally I'm trying to use something based on that row number or an even/odd basis

sorry, I should have been clearer mate !

Chris
:)
 
Upvote 0
Chris,

I believe that this should do the trick for you:

=SUM(IF(MOD(ROW(A1:A20),2)=0,A1:A20))

Enter it as an array formula by pressing Ctrl+Shift+Enter all at once.


enjoy

Bariloche
 
Upvote 0
G'Day Chris
Sorry mate, I just couldn't resist it.
This is probably something you can do with an array formula but I can only do it the hard way by putting this in B1, scrolling down, then summing it
=IF(ISEVEN(ROW()),A1,0)
Perhaps this will help until someone cleverer than me comes along
Have a good day
Derek
 
Upvote 0
Fab, thanks guys

Juan Pablo - thanks, I should remember about those tips : one quick question though, I couldn't understand what the "-row(A1)" in the mod function was there for

=SUM((MOD(ROW(A1:A250)-ROW(A1),2)=0)*(A1:A250))
 
Upvote 0
For that, i give FULL CREDIT to Aladin...

The -ROW(A1) is to "adapt" the formula to whatever range, doesn't matter in which row it starts. In other words, "offset" the range to row 0 (Or was it 1 ?)
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,104
Members
448,548
Latest member
harryls

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