Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Claification

Sorry for the confusion..
Data copied from [052107.xls.]Summary! to [summary_may]Summary
Richard
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to CF using a wildcard toonarme Excel Discussion (Misc queries) 3 July 18th 10 10:52 PM
VBA Wildcard Code Tony Excel Discussion (Misc queries) 8 May 15th 09 03:34 PM
Using the wildcard with IF DamienO New Users to Excel 5 January 29th 09 01:51 AM
If and wildcard Fish Excel Discussion (Misc queries) 3 October 1st 08 01:33 AM
sum if wildcard Marcel New Users to Excel 1 April 30th 06 11:25 AM


All times are GMT +1. The time now is 11:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"