Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This sounds like your Totalling sheet is a list of invoices for th month. Then what you want to do is collect all invoices for eac company for a monthly statement. An easy way to do this is to use AutoFilter. Try using the macro recorder to do this: Select any cell in your dataset Turn on the recorder. Click Data|Autofilter. In col A select a company Select the entire range Insert a new worksheet Turn off the recorder and look at your new code. If you make a list of all company names, you can add code to your macr like this: Dim oCell as range, x as integer,CompanyName as string x=sheets.count For each oCell in Range("CompanyNameList") CompanyName = oCell.value ....use the code that you recorded.... Copy Destination:= sheet(x).range("A2") x=x+1 next this should get you started ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |