View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dominique Feteau Dominique Feteau is offline
external usenet poster
 
Posts: 34
Default Copy 2 application references

I have a billing sheet where I want to filter to the type of billing i want
shown, copy the columns that i need and paste them into a new workbook. To
make this easier, I created a defined name for all the columns that i want
copied and named them "submitted". In the macro I created, it does that and
does a little editing as well. Here is the macro that i'm using:

Sub Billing()
'
' Billing Macro
'
Selection.AutoFilter Field:=8, Criteria1:="1"
Application.Goto Reference:="Submitted"
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
Columns("M:M").Select
Application.CutCopyMode = False
Selection.Cut
Columns("C:C").Select
Selection.Insert Shift:=xlToRight
End Sub

The one other thing that I want is to include the amount, that has its own
defined name because this will change from month to month. Is there a way
for this macro to copy both references "submitted" and another one called
"feb" into the same worksheet?

Dominique