Hello
I have the following macro which copies data from selected range and paste the formulas into the other worksheets...however, it's for some reason, not changing or find/replacing the worksheet name :S
Sub CopyToAll()
Dim ws As Worksheet, _
wslist() As Variant, _
testval As Variant
wslist = Array("Vancouver-Kelowna", "Canada East", "Canada West", "US Northeast", "US Central", "US Southeast", "US West", "US Total", "Canada Total")
For Each ws In ActiveWorkbook.Worksheets
testval = Application.Match(ws.Name, wslist, 0)
If IsError(testval) And ws.Visible Then
Sheets("Vancouver-Kelowna").Range("B5:X5").Copy Destination:=ws.Range("B5")
Sheets("Vancouver-Kelowna").Range("B62:X62").Copy Destination:=ws.Range("B62")
ws.Cells.Replace What:="\\Shrdfs1\teams\Sales Analyst\SWAT\Archieve 2011\P1W4\[Vancouver-Kelowna.xls]Ghost Summary'!$C$8", Replacement:="\\Shrdfs1\teams\Sales Analyst\SWAT\Archieve 2011\P1W4\[" & ws.Name & ".xls]Ghost Summary'!$C$8", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True
End If
Next ws
End Sub
any ideas..pls help, thx you.
Bookmarks