Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy to wildcard
those look more like workbook names not sheet names but i'm going by what you said
Sub CopyData( LstClmn = Sheets("052107.xls").UsedRange.Offset (0, ActiveSheet.UsedRange.Columns.Count - 1). Resize(, 1).Colum x = YourRowCoun Mnth =Cstr( Format(Now,"mmm")) '<< assuming you use three letter abbreviation for each month Sheets.("summary_" & Mnth &".xls"). Range(Cells(1,1), Cells(x,LstClmn)) = Sheets("052107.xls").Range(Cells(1,1), Cells(x,LstClmn) End Su ----- Richard wrote: ---- Greetings I am copying data from a daily worksheet (052107.xls) to a monthly summary (summary_may.xls), the data on the daily sheets will have the same number of rows but different numbers of columns. How can I copy the used range on the daily summary sheet to the monthly sheet Thanks Richard |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy to wildcard
Sub CopyData( LstClmn = Sheets("052107.xls").UsedRange.Offset (0, ActiveSheet.UsedRange.Columns.Count - 1). Resize(, 1).Colum x = YourRowCoun Mnth =Cstr( Format(Now,"mmm")) '<< assuming you use three letter abbreviation for each month Sheets("052107.xls").Range(Cells(1,1), Cells(x,LstClmn)).Copy Destination:= Sheets.("summary_" & Mnth &".xls"). Range(Cells(1,1), Cells(x,LstClmn)) End Su ----- Richard wrote: ---- Greetings I am copying data from a daily worksheet (052107.xls) to a monthly summary (summary_may.xls), the data on the daily sheets will have the same number of rows but different numbers of columns. How can I copy the used range on the daily summary sheet to the monthly sheet Thanks Richard |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Claification
Sorry for the confusion..
Data copied from [052107.xls.]Summary! to [summary_may]Summary Richard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trying to CF using a wildcard | Excel Discussion (Misc queries) | |||
VBA Wildcard Code | Excel Discussion (Misc queries) | |||
Using the wildcard with IF | New Users to Excel | |||
If and wildcard | Excel Discussion (Misc queries) | |||
sum if wildcard | New Users to Excel |