Subtotal for column range ( not row range )

Rolly_Sefu

Board Regular
Joined
Oct 25, 2013
Messages
149
Hello,



I have a table that is growing with each day to the RIGHT. Column data are numbers


And at one point i want to hide some columns and make a sum of the columns that remain.


But Subtotal only works with rows.


Is there a way to make: =SUBTOTAL(109;A2:F2) - this one is not working


Thank you
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hello,

But Subtotal only works with rows.

Is there a way to make: =SUBTOTAL(109;A2:F2) - this one is not working

Thank you

Hi,

I don't think that's true, SUBTOTAL works for Rows as Well as Columns (may be it's because of the "semicolon"?)

Otherwise, try using SUM as suggested by r1998, but take out the "109"

so just =SUM(A2:F2)
 
Upvote 0
Hello


The sum works just fine if all column are shown.


But then i hide a column, the sum result does not change, and its the same situation with the subtotal.

Any other ideas ?
 
Upvote 0
One option, with a helper row


Excel 2013 32 bit
FGHIJ
19868
251.750185-0.32129515981207054723086.4
Update
Cell Formulas
RangeFormula
F1=CELL("width",F1)
G1=CELL("width",G1)
H1=CELL("width",H1)
I1=CELL("width",I1)
J2=SUMIF(F1:I1,">0",F2:I2)
 
Last edited:
Upvote 0

Excel 2013 32 bit
FGIJ
1988
251.750185-0.32129207054207105.4
Update


But you will need to hit F9 as this will not recalc automatically
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,391
Messages
6,124,678
Members
449,179
Latest member
fcarfagna

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