Formula to skip hidden columns

Mldeuser

Well-known Member
Joined
Dec 27, 2008
Messages
574
Office Version
  1. 365
Platform
  1. Windows
Hello

I have a sales worksheet that covers 2009-2011. I need a formula that can sum the previous 12 months. The columns are as follows

03/11, 02/11 YTD, 02/11-03/10, 02/11

I need to only sum the columns 03/11, 02/11, 01/11 and so on skipping the two hidden columns between each monthly column.

I hope this makes sense

Thank you
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Assume your data begins in B2, enter the following formula in A2 as an array. (To enter a formula as an array, type the formula and press Ctrl+Shift+Enter.)

=SUM(IF(MOD(COLUMN(OFFSET(B2,0,0,1,36))-COLUMN(B2),3)=0,OFFSET(B2,0,0,1,36),0))
 
Upvote 0
Thank you for the formula but it is not skipping the two hidden columns.

I placed the formula in cell A2 and entered information into cells B2 through E2. The formula should only add cells B2 & E2, however it is adding B2 through E2

Any thoughts

Thank you
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,183
Members
452,893
Latest member
denay

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