ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   adding blank rows (https://www.excelbanter.com/excel-programming/280380-adding-blank-rows.html)

greg malenky

adding blank rows
 
Excel 2000

I'm very new to VBA. What I need to create is a macro
that will add a blank row between sections of common data.

each section can range from 2 to 10 rows of data, then
the end will summarize the data for each section, then
finally, the last row will be a grand total for all the
information.

example

saleman area sales
salesman #1 north 2400
salesman #2 north 3200
salesman #3 north 1000
(blank row)
salesman #1 east 2200
salesman #2 east 5000
(blank row)
salesman #1 south 2000
salesman #2 south 2300
salesman #3 south 1800
(blank row)
salesman #1 west 2100
salesman #2 west 1300
(blank row)
north totals 6600
east totals 7200
south totals 6100
west totals 3400
(blank row)
grand total 23300

any help would be appreciated

thank you.


Kevin McCartney[_2_]

adding blank rows
 
Hi,
There's a menu function that may solve you problem. On
the menu bar look under Data, SubTotals.

Best regards
KM

-----Original Message-----
Excel 2000

I'm very new to VBA. What I need to create is a macro
that will add a blank row between sections of common data.

each section can range from 2 to 10 rows of data, then
the end will summarize the data for each section, then
finally, the last row will be a grand total for all the
information.

example

saleman area sales
salesman #1 north 2400
salesman #2 north 3200
salesman #3 north 1000
(blank row)
salesman #1 east 2200
salesman #2 east 5000
(blank row)
salesman #1 south 2000
salesman #2 south 2300
salesman #3 south 1800
(blank row)
salesman #1 west 2100
salesman #2 west 1300
(blank row)
north totals 6600
east totals 7200
south totals 6100
west totals 3400
(blank row)
grand total 23300

any help would be appreciated

thank you.

.


JMMach

adding blank rows
 
Rather than adding a blank row, change the height of the first row of a
common block, eg. first row of East, South, West.
You will achieve your stated effect without messing up your list.
--
TTFN
JMMach

"greg malenky" wrote in message
...
Excel 2000

I'm very new to VBA. What I need to create is a macro
that will add a blank row between sections of common data.

each section can range from 2 to 10 rows of data, then
the end will summarize the data for each section, then
finally, the last row will be a grand total for all the
information.

example

saleman area sales
salesman #1 north 2400
salesman #2 north 3200
salesman #3 north 1000
(blank row)
salesman #1 east 2200
salesman #2 east 5000
(blank row)
salesman #1 south 2000
salesman #2 south 2300
salesman #3 south 1800
(blank row)
salesman #1 west 2100
salesman #2 west 1300
(blank row)
north totals 6600
east totals 7200
south totals 6100
west totals 3400
(blank row)
grand total 23300

any help would be appreciated

thank you.





All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com