Macro to run formulas for multiple ranges of data in a spreadsheet to summarize data in the first blank row after the data summaries

maxf24

New Member
Joined
Mar 12, 2014
Messages
25
I have data history information and two blank lines after each sample there could be anywhere from one sample with 9 rows of data, or there could be 50 samples with 12 rows of data each.

When I receive the data, the first row after Data Samples BLANK, in this case row 12.

But in the first blank row at end of each sample of data i want to have a macro to automatically process data to summarize the the data samples using the following formulas.
F12- Formula is Sum(F2:F11)
G12- Formula is Max(G2:G11)H12- Formula is Sum(H2:H11)I12- Formula is (H12/F12)J12- Formula is (F12/(G12*8760))
* The ranges change
F26 ​ Sum(F14:F25)
G26
Max(G14:G25)
H26
SUM(H14:G25)
I26
(H26/F26)
J26
(F12/(G12*8760))

Example of what I'm trying to achieve. Could be 1-50+ data samples
Row | Column A B E G H I J K L N O P
1 Headings
DATA SAMPLE
2 Rows 2-11 would be filled with Data could be anywhere from 7 rows to 15 rows
3
4
5
6
7
8
9
10
11
12Formulas Columns with formulas at end of data are: F,G, H, I, J
13Blank
DATA SAMPLE 2
14 Rows 14-26 filled with different data values this could be longer or shorter than above summary
15
16
17
18
19
20
21
22
23
24
25
26
26Formulas at bottom of data in columns F,G,H,I,J
24Blank

Any help would be greatly appreciated!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,215,064
Messages
6,122,937
Members
449,094
Latest member
teemeren

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