Set up Macro *PLEASE HELP IMPORTANT*

G

Guest

I'm trying to set up a macro so when i open up my bank file i could separate
all of my different accounts "pools" and i did the filter which worked well I
did the filter and it worked
December 2, 2005 - 10:21 AM
Thanks for your quick response.. Here is my macro

Cells.Select
Cells.EntireColumn.AutoFit
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="3"
Rows("1105:1333").Select
Selection.Cut
Sheets("DMAFILED0548D").Select
Sheets.Add
ActiveSheet.Paste
Sheets("DMAFILED0548D").Select
Selection.AutoFilter Field:=1, Criteria1:="4"
Rows("1336:1436").Select
Selection.Cut
Sheets("Sheet1").Select
ActiveWindow.SmallScroll Down:=201
Range("A230").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Separate"
Sheets("DMAFILED0548D").Select
Selection.AutoFilter Field:=1, Criteria1:="23"
Rows("1475:1479").Select
Selection.Cut
Sheets("DMAFILED0548D").Select
Sheets.Add
ActiveSheet.Paste
Sheets("DMAFILED0548D").Select
Selection.AutoFilter Field:=1, Criteria1:="24"
Rows("1482:1548").Select
Selection.Cut
Sheets("Sheet2").Select
Range("A6").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Sheets("Sheet2").Name = "Pru-Arizona"
Cells.Select
Cells.EntireColumn.AutoFit
Sheets("Separate").Select
Cells.Select
Range("A202").Activate
Cells.EntireColumn.AutoFit
End Sub

you see in the "ROWS" lines it shows the line numbers I highlighted, now
tmrw it might be more lines i need to bring over to the other worksheet or it
might be less lines. that's my problem..
 
D

David McRitchie

Hi Vic,
Not sure but I think you might use the following, if not it still would
seem to be related so you might use it later on.
Right at the top above everything else on the page is links for addin
DataPig Excel Explosion 3.0 (zip) (flash video)
http://www.datapigtechnologies.com/ExcelMain.htm
search for explosion if you don't see it. --- it will separate
a worksheet based on values in a column to worksheets with
the name of the value. Directions included in the video show
how to use a helper column to involve more than one column or to quantify.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top