SOLVED

New Contributor

How to count

Hi, need some help with below topic :

- in the template, the range B1:B12 - have some numbers

- want to summary on those columns , which are define by number , which is indeecated separatly

eg. B1- 2;B2-1;B3-5 ; in the other cell (eg.J1)have a formula's result eg.2 , so want to count only 2 cells - b1&b2; result in J1 can change to eg3 - so I want to calculate than all3 numbers from range B1:B3.

How to do that? Need help

8 Replies

Re: How to count

``=SUM(INDIRECT("B1:B"&J1))``

You can try this formula if you want to sum the ranges.

Re: How to count

A non-volatile formula that requires Excel 365

``= SUM(TAKE(data, N))``

where 'data' is \$B\$1:\$B\$15 and 'N' is \$J\$1.

Re: How to count

Have tried witha rows and failed

What should I change?

best response confirmed by Tom67K (New Contributor)
Solution

Re: How to count

``=SUM(\$B\$5:INDEX(\$B\$5:\$P\$5,J1))``

This formula returns the intended result in my sheet.

Re: How to count

For me it changes the formula to

``= SUM(TAKE(data,1,N))``

Re: How to count

I prefer that to the INDIRECT!