SUM every other column - even and uneven columns

Amapola

New Member
Joined
Jul 7, 2010
Messages
17
We monitor the dose staff might be exposed to. There are two different values. - I have a sheet with 2 columns for each month where I input the value.

I also need to monitor the accumulated dose. Once for the last 12 months and once for all the values I have (at some stage this will be the last 5 years but I have only 2 years of data at the moment).

I'm using an array formula to caculate the first value and that seems to work:
=SUM(IF(MOD(COLUMN($H4:$CR4),2)=0,$H4:$CR4,0))
These values are in the even columns (H, J, L, N, etc.)

I have been playing around with the formula for the uneven columns but can't get that to work. Uneven seems to be more of a challenge for Excel.

In the long run, I will also need to find a formula that calculates 12 months back from the last entry. My brain doesn't even comprehend that yet. It might be easier to do in VBA? Anyway, I need to sort the issue with the uneven columns first.

Does anybody have an idea? I have cleaned up my file and could share but I don't seem to be able to attach it in this post.

Thanks, Christine
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
...
I'm using an array formula to calculate the first value and that seems to work:
=SUM(IF(MOD(COLUMN($H4:$CR4),2)=0,$H4:$CR4,0))
These values are in the even columns (H, J, L, N, etc.)

I have been playing around with the formula for the uneven columns but can't get that to work.
...
Hi Christine,

Try this array formula confirmed by Ctrl-Shift-Enter:
=SUM(IF(MOD(COLUMN($H4:$CR4),2)=1,$H4:$CR4,0))

or that not array formula:
=SUMPRODUCT((MOD(COLUMN($H4:$CR4),2)=1)*$H4:$CR4)

Regards
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,354
Members
449,155
Latest member
ravioli44

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