Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy 2 application references
I figured out how to do what I needed to do below by just adding the next
defined name in the reference field (e.g. Application.Goto Reference:="Submitted,Feb") but now what I want to do is setup a message box that automatically fills in those 2 references. Can someone help me out? Niq "Dominique Feteau" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to copy cell references? | New Users to Excel | |||
Excel opening new copy of application for each file | Excel Discussion (Misc queries) | |||
Copy/paste from other application without delimiting it? | Excel Discussion (Misc queries) | |||
how do I copy R[40]C1 references | Excel Worksheet Functions | |||
copy formula using same references | Excel Worksheet Functions |