Sum only visibile cells using SUBTOTAL in Excel -


i'm intending current balance of stock using excel sheet. in workbook, balance entered every day. recent day's balance shown, other hidden. data entered in columns, , hence 1 column of data shown.

in example, want sum values row 21 24. enter formula first documented balance, columns ahead in time (so range not need changed often).

for use:

  =subtotal(109,c21:o24) 

the last column's values sums 20. however, using formula sums 260. sums values in row 21 24!

i confered site https://support.office.com/en-us/article/subtotal-function-7b027003-f060-4ade-9040-e478765b9939 says value "109" should used first argument in order sum non-hidden values. evidently, not work. tried use "9" first argument same result.

what missing? why doesn't formula execute intended?

mcve (i reckon if copied cell a20, value should become 260. when hiding columns a,b , o should give 20 using subtotal, me still produces 260).

  stock                                                                         prod1    5   5   5   5   5   5   5   5   5   5   5   5   5               prod2    5   5   5   5   5   5   5   5   5   5   5   5   5                   prod3    5   5   5   5   5   5   5   5   5   5   5   5   5               prod4    5   5   5   5   5   5   5   5   5   5   5   5   5           =subtotal(109;c21:o24) 

regards

from documentation:

for function_num constants 1 11, subtotal function includes values of rows hidden hide rows command under hide & unhide submenu of format command in cells group on home tab in excel desktop application. use these constants when want subtotal hidden , nonhidden numbers in list. function_num constants 101 111, subtotal function ignores values of rows hidden hide rows command. use these constants when want subtotal nonhidden numbers in list.

so can't used sum cells hidden columns.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -