LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default NEED a MAJOR help with SHEETS copying MACRO

Try
Sub copyToAlternateSheets()
Dim i As Integer
Dim ws, dest As Worksheet
Dim srcName, destName As String
Dim wksNumber
For Each ws In Worksheets
wksNumber = CInt(Left(ws.Name, 2))
If (wksNumber Mod 2) = 1 Then
srcName = ws.Name
For Each dest In Worksheets
If CInt(Left(dest.Name, 2)) = "0" & (wksNumber + 1) Then
destName = dest.Name
Exit For
End If
Next dest
Worksheets(srcName).Activate
ActiveSheet.Columns("J:J").Copy
Worksheets(destName).Activate
ActiveSheet.Range("J1").Select
ActiveSheet.Paste
End If
Next ws
End Sub

"bioyyy" wrote:

Joel and Sheelo:

Thanks for your BIG help! But I made one big mistake in my question.

The sheet names are not the same as I wrote Test. Actually, each sheet has
different names (i.e. 05-ABC, 06-Test, 07-adge, 08-iesdf, .....For example).
I hope you can help me to fix it. Thanks again,





 
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
Need Major Help on the Macro bioyyy Excel Discussion (Misc queries) 12 October 25th 08 11:43 AM
Copying Sheets LiAD Excel Worksheet Functions 1 September 10th 08 04:55 PM
Copying sheets in a macro jhyatt Excel Discussion (Misc queries) 0 October 3rd 07 07:17 PM
Linking sheets into one major sheet? Ellymoo Excel Worksheet Functions 8 April 24th 06 11:22 AM
Copying Macro w/ different sheets liseladele Excel Worksheet Functions 1 March 22nd 06 01:43 AM


All times are GMT +1. The time now is 10:55 PM.

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

About Us

"It's about Microsoft Excel"