How to create a macro to handle this problem

Debbie in PA

New Member
Joined
Mar 28, 2002
Messages
1
I have about 13,000 rows of data that need to be processed. I separate the data by inserting a blank line after each "set" of samples. One sample may have 3 rows of data, another may have 10, another may have 5 or 6 or even 1. I want the macro to count the rows until it encounters the blank line that I've inserted between the data. Then I need it to average the rows it has counted and put the average in the row just beneath the data it is associated with and then insert a new blank line (to make the data easier to read), then continue to the next row, start counting again and repeat the same process. I was using a macro that had a set number of lines which worked fine when each sample only contained 3 rows of data and everything was consistent.
Any help is greatly appreciated.
Thanks.
Debbie
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi Debbie:
Have you tried DATA|SUBTOTALS ...
I think your problem fits nicely into its capabilities.
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,972
Members
448,537
Latest member
Et_Cetera

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