View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default NEED a MAJOR help with SHEETS copying MACRO

Sub CopyColJ()

For Each sht In Sheets

If UCase(Right(Trim(sht.Name), 5)) = "-TEST" Then
ShtNum = Val(sht.Name)
'test if sheet number is odd
If ShtNum Mod 2 = 1 Then
NextShtName = Format(ShtNum + 1, "#00") & _
"-Test"
sht.Columns("J").Copy _
Destination:=Sheets(NextShtName).Columns("J")
End If
End If

Next sht


End Sub

"bioyyy" wrote:

Hello,

I am trying to copy and column J from an odd number (starting from 05) sheet
to even number sheet:

For example:

copy Column J of 05-Test (Sheet name) and paste column J of 06-Test (Sheet
name)

so on for 07-Test to 08-Test, Up to 25-Test to 26-Test.


Thanks