#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default macro help

6060 50
6060 800
6070 700
6070 60
6070 410


i need to insert rows to separate by account number and and add totals so
that it should look like this

6060 50
6060 800
850
6070 700
6070 60
6070 410
1170

thans for your help


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default macro help

How about using something built-in that's very close.

Add headers to your data if you don't have them already.
Then select the range ryou want to subtotal (A1:B999???)
And sort by that first column
Then Data|subtotal
At each change in the first field, sum the second.
You can hide the details using the outlining symbols at the left if you want.

If you only want to get the subtotals, you could use data|pivottable.

If you've never use pivottables, here are a few links:

Debra Dalgleish's pictures at Jon Peltier's site:
http://peltiertech.com/Excel/Pivots/pivottables.htm
And Debra's own site:
http://www.contextures.com/xlPivot01.html

John Walkenbach also has some at:
http://j-walk.com/ss/excel/files/general.htm
(look for Tony Gwynn's Hit Database)

Chip Pearson keeps Harald Staff's notes at:
http://www.cpearson.com/excel/pivots.htm

MS has some at (xl2000 and xl2002):
http://office.microsoft.com/downloads/2000/XCrtPiv.aspx
http://office.microsoft.com/assistan...lconPT101.aspx


andresg1975 wrote:

6060 50
6060 800
6070 700
6070 60
6070 410

i need to insert rows to separate by account number and and add totals so
that it should look like this

6060 50
6060 800
850
6070 700
6070 60
6070 410
1170

thans for your help


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default macro help

thanks a lot

"Dave Peterson" wrote:

How about using something built-in that's very close.

Add headers to your data if you don't have them already.
Then select the range ryou want to subtotal (A1:B999???)
And sort by that first column
Then Data|subtotal
At each change in the first field, sum the second.
You can hide the details using the outlining symbols at the left if you want.

If you only want to get the subtotals, you could use data|pivottable.

If you've never use pivottables, here are a few links:

Debra Dalgleish's pictures at Jon Peltier's site:
http://peltiertech.com/Excel/Pivots/pivottables.htm
And Debra's own site:
http://www.contextures.com/xlPivot01.html

John Walkenbach also has some at:
http://j-walk.com/ss/excel/files/general.htm
(look for Tony Gwynn's Hit Database)

Chip Pearson keeps Harald Staff's notes at:
http://www.cpearson.com/excel/pivots.htm

MS has some at (xl2000 and xl2002):
http://office.microsoft.com/downloads/2000/XCrtPiv.aspx
http://office.microsoft.com/assistan...lconPT101.aspx


andresg1975 wrote:

6060 50
6060 800
6070 700
6070 60
6070 410

i need to insert rows to separate by account number and and add totals so
that it should look like this

6060 50
6060 800
850
6070 700
6070 60
6070 410
1170

thans for your help


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 01:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"