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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
...
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,224,828
Messages
6,181,214
Members
453,024
Latest member
Wingit77

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