"Sumup a range which varies from cell to cell"

Marwan69

Board Regular
Joined
Mar 14, 2018
Messages
80
Hello Ladies & Gentlemen,

I've got a sheet contains lengthy numbers. Each set of numbers separated with blank cell for totals. I'd like to sum up these numbers in the blank cell but I need to go to each group of numbers to do that.
Is there any idea to quickly sum up these numbers without having to go to each one of them.

i.e: These numbers are located from cell (A1 : A5)
1235
252
422
322
200
Then(A6) is blank for total.
From cell (A7:A9)
5000
455
788
Then(A10) is blank for total.

and so on...

Thanks.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
How about
VBA Code:
Sub Marwan()
   Dim Rng As Range
   For Each Rng In Range("A:A").SpecialCells(xlConstants).Areas
      Rng.Offset(Rng.Count).Resize(1).Formula = "=sum(" & Rng.Address & ")"
   Next Rng
End Sub
 
Upvote 0
Yes, just select each blank cell in col A & type in a formula adding the cells above.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
1) select A1:A14
2)Ctrl+G--->special--->blanks--->OK
3)hold Alt and press =
11.gif
 

Attachments

  • 11.gif
    11.gif
    196 KB · Views: 2
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

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