Insert sum on the first blank row after each section of data

spacecaptainsuperguy

Board Regular
Joined
Dec 30, 2004
Messages
202
Office Version
  1. 365
Platform
  1. Windows
I've got a spreadsheet with a bunch of loan information on it that I'm breaking apart into sections by loan number. I've got my code already in place to go down the loan number column (column A) and add a few blank rows at every change in loan number. My goal is to add a sum formula (column E) on the first blank row for that section of data on that particular loan and use the next couple of rows for some comparative data. I'm having a hard time figuring out the code to do this part. Essentially it needs to go down each section of data, find the blank row after it, add a sum formula for that section and then keep going down the spreadsheet for each successive section until it gets to the end.

Any ideas on how to code that?
Thanks in advance.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Here is what it looks like at this point

Test.xlsx
ABCDE
6Loan NumberAccount NumberBorrower NamePropertyPrincipal Balance
72168SEM-008Name 1TR. 25 $59,380.93
82168SEM-016Name 2TR. 26 $44,852.12
92168SEM-020Name 3TR. 4 $41,995.64
102168SEM-028Name 4TR. 9 $40,644.30
112168SEM-031Name 5TR. 35 $32,659.59
122168SEM-051Name 6TR. 30 & 31 $96,263.44
132168SEM-063Name 7TR. 2 & 3 $77,659.54
14
15
16
17
183795ORR-009Name 8 TR. 14 $42,682.68
193795ORR-010Name 9TR. 4 $40,370.78
203795ORR-021Name 10TR. 5 $51,404.26
213795ORR-022Name 11TR. 6 $51,115.84
223795ORR-028Name 12TR. 18 $58,650.98
23
24
25
26
273796WEST-002Name 13TR. 19, 20 & 21 $113,471.29
283796WEST-013Name 14TR. 8 $38,514.93
293796WEST-015Name 15TR. 9 $45,568.28
303796WEST-021Name 16TR. 10 $49,245.98
313796WEST-023Name 17TR. 17 $44,885.17
323796WEST-027Name 18TR. 1 $46,762.84
333796WEST-028Name 19TR. 15 $48,591.93
34
Export
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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