Function_num

Moti

Board Regular
Joined
May 8, 2003
Messages
57
Can anyone help me with this function?:

its part of the subtotal syntax for including or excluding hidden rows:
=SUBTOTAL(Function_num,[ref1],[ref2]) (9)

Is there a way to get this function to exclude hidden columnn as well.
currently it only works to exclude hidden (grouped) rows.

Thanks.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
You can choose a function No. from 101 to 111 for the function to ignore hidden rows. i.e 109 for SUM, 101 AVERAGE etc. I think this feature is available from Excell 2003.

This function ignores any nested subtotals. Also, when used with a data filter it only uses the displayed values.

Cheers
 
Upvote 0
Thanks, but I have tried what you suggest.
The 109 function does not include or exclude columns if they are hidden. The function only works on rows.

I am looking for a function that excludes columns if they are hidden or grouped and includes them if they are expanded.
 
Upvote 0
Can anyone help me with this function?:

its part of the subtotal syntax for including or excluding hidden rows:
=SUBTOTAL(Function_num,[ref1],[ref2]) (9)

Is there a way to get this function to exclude hidden columnn as well.
currently it only works to exclude hidden (grouped) rows.

Thanks.

See the 4th Remark in the SUBTOTAL help topic.

Code:
The SUBTOTAL function is designed for columns of data, or vertical ranges. It is not designed for rows of data, or horizontal ranges. For example, when you subtotal a horizontal range using a function_num of 101 or greater, such as SUBTOTAL(109,B2:G2), hiding a column does not affect the subtotal. But, hiding a row in a subtotal of a vertical range does affect the subtotal.
 
Upvote 0
Thanks, but i know that.
I am asking if there is a similar function that does affect columns.
 
Upvote 0
However, absent a native function for the job, you can construct a formula that will operate only on visible cells.

what are you actually trying to do? what data have you got? what results do you expect?
 
Upvote 0
I am not sure how to explain.

Assume I have 3 colums per month for 3 months.
Sales, Returns and Commision.

Going down the rows I have different product codes and the data therfore shows for example what the sales value of product code 110456 in each month is. The same is obviously true of returns and consequently commision.

ITO formatting I group each month: Data > Group and Outline > Group.

What I want is to total all the sales for each month, all the returns for a month and all the commision.
However if the grouping of a particular month is closed - hidden then the calculation must ignore those figures, but must include them if the groping is open, i.e the months figures can be seen.

Type 10 into A1 and 20 into A2. In B3 type =subtotal(109,A1,A2)

Then select row two, go to Data, Group and Outline click Group. There will be a little minus sign on the left of the row 2. As you click it, you will notice the result of the subtotal change from 30 to 10 as you either group or ungroup row 2. I want to do exactly this but I group columns, not rows and there seems to be no function that allowes me to do that.

What do I do?

Thanks.

I hope this is clear. :oops:
[/quote]
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,331
Members
452,636
Latest member
laura12345

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