# a SUM formula based on a COUNT value

#### xljruser

##### New Member
I would like to create a formula which sums up cells from another worksheet. Easy enough. In my current worksheet I have =SUM(August!B1:B10). The other worksheet is the previous month, and my current worksheet is the current month.

But how do I change B10 in the formula above to B11, B12 based on a COUNT in the current sheet. Ie If count in my current worksheet = 12, then replace the B11 to B12. If count=14, then change the B10 to B14 and so on. Currently I do this manually, but sometimes I forget. I guess this is more like a SUM formula based on the result of a COUNT formula.

=sum(Aug!B1:B(the value of the =count cell))

Any ideas?

### Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try

If your count is in cell H2..

=SUM(August!B1:INDEX(August!B:B,H2))

thanks guys. Got it to work.

thanks

Replies
6
Views
162
Replies
1
Views
545
Replies
9
Views
243
Replies
0
Views
347
Replies
5
Views
279

1,218,664
Messages
6,143,767
Members
450,503
Latest member
dforce

### 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.

### Which adblocker are you using?

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

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