copy range from different worksheets

CThai

Active Member
Joined
Mar 18, 2007
Messages
295
Hi -

I have a workbook with 58 worksheets in it... each worksheets is name T01, T02....T58, I need to copy a range from different worksheets...

I don't need all the worksheets in Master.xls I only need some of the worksheets...

for example :

I need -
T01 - range from A3:N59
T03 - range from D3:P50
T05 - range from D4:O60
T07- range from D3:N72
T08 range from B3:N55
ect...


I would like to copy the Value and format ...

please help

thank you

Cthai
 
or you could just remove that line, and put the macro in the Master Workbook and run it from the master workbook.
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
ok now it's giving me another error

and this is highlighted [code[Sheets("T" & Format(x, "0#")).Select[/code]

i have both workbooks open and i pasted the codes into Jan.xls...
 
Upvote 0
Same thing, check spelling of sheet names

you have

T01 - T58.

in T01 - is that the LETTER O or the NUMBER 0 ??
 
Upvote 0
try putting the second code into master - getting the same error with the same code high lighted
 
Upvote 0
check the sheetnames, look for leading/trailing spaces.

There are 58 of them right? T01 - T58 ?
 
Upvote 0
there are 58sheets ... some sheets are name T23a, T23b... ect... sorry if this make a different... also there are some sheets some are label as names
 
Upvote 0
yeah, that's a big difference...

on the Master Workbook, are you wanting to do ALL sheets - regardless of name?

This would be easier, we can just loop through all sheets and name the new sheet according to the selected sheet..

If there are some sheets you want EXCLUDED, that's not a big deal, just give me the names of sheets you want EXCLUDED...
 
Upvote 0
yes - it would be best if we can loop through all the sheets and name the new sheet according to the selected sheet... there are some sheets that i want to exclude... but right now I dont know which one ... i only got up to updating 28 sheets out of the 58 sheets...

i dont know if this would help but i did a recoding Marco and here is what i show me.. i only did like 4 worksheets, just to give an idea...

Code:
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 7/27/2007 
'

'
    Windows("Master.xls").Activate
    Selection.Copy
    Windows("Jan.xls").Activate
    Range("A1").Select
    ActiveSheet.Paste
    ActiveWindow.SmallScroll Down:=39
    Sheets("Sheet1").Select
    Sheets("Sheet1").Name = "T01"
    Sheets("Sheet2").Select
    Windows("Master.xls").Activate
    Sheets("T_03").Select
    Range("C4:M74").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("Jan.xls").Activate
    ActiveSheet.Paste
    Sheets("Sheet2").Select
    Windows("Master.xls").Activate
    Sheets("T_05").Select
    Range("C4:O69").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("Jan.xls").Activate
    Sheets("Sheet3").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveWindow.SmallScroll Down:=6
    Sheets("Sheet2").Select
    Sheets("Sheet2").Name = "T02"
    Sheets("Sheet3").Select
    Sheets("Sheet3").Name = "T03"
    Sheets("T03").Select
    Sheets.Add
    Sheets("Sheet1").Select
    Sheets("Sheet1").Move After:=Sheets(4)
    Windows("Master.xls").Activate
    Sheets("T_07").Select
    Range("C4:N69").Select
    Selection.Copy
    Windows("Jan.xls").Activate
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveWindow.SmallScroll Down:=12
    Sheets("Sheet1").Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top