suming every 3rd column

S

Steved

Hello from Steved

Looking at the below I hide 2 Colums for example K and L Columns and so on

Is there please a Sum function I can use to sum colums but ignore the hidden
columns.

=J3+M3+P3+S3+V3+Y3+AB3+AE3+AH3+AK3+AN3+AQ3

Thankyou.
 
M

Martin Fishlock

Hi Steve D

Try using this formula

=SUMPRODUCT(--(MOD(COLUMN(J1:AS1),3)=1),(J1:AS1))

What it does is checks every third row using the column number and getting
the modulus of it of 3 (ie giving 0,1,2) and only selects the cells where the
mod = 1.

MOD(COLUMN(J1:AS1),3)=1<------

You need to modify the last one in the above if you move cells.

=SUMPRODUCT(--(MOD(COLUMN(O1:AX1),3)=MOD(COLUMN($O$1),3)),(O1:AX1))

Or you can add an extra starting cell to work out which is the mod to use.
 
M

Martin Fishlock

Whoops,

checks every third row using

should be

checks every third column using
 
S

Steved

Hello Martin from Steved

Thanks

Martin Fishlock said:
Hi Steve D

Try using this formula

=SUMPRODUCT(--(MOD(COLUMN(J1:AS1),3)=1),(J1:AS1))

What it does is checks every third row using the column number and getting
the modulus of it of 3 (ie giving 0,1,2) and only selects the cells where the
mod = 1.

MOD(COLUMN(J1:AS1),3)=1<------

You need to modify the last one in the above if you move cells.

=SUMPRODUCT(--(MOD(COLUMN(O1:AX1),3)=MOD(COLUMN($O$1),3)),(O1:AX1))

Or you can add an extra starting cell to work out which is the mod to use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Checking for black cells 3
Sumproduct Across A Row 11
Any Way Around 7-Nested Function Limit? 9
NESTED 2
Adding and subtracting time 2
UDF ...VBA Formula built ...please help 22
Input boxes 5

Top