Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks A Million Tom
"Tom Ogilvy" wrote: There was/is a typo: With Worksheets("Client Marketing") * Worksheets("Jobs 0104").Cells(i, nCol).Copy Destination = .Cells(j, 1) * j = j + 1 End With Destination = should be Destination:= with a colon then equal -- Regards, Tom Ogilvy "teresa" wrote in message ... Hi, this is working fine, but there's a couple of lines (asterisked) which aren't processing fine.i.e. doesn't seem to be pasting. Thanks Sub jo() Dim i As Variant nCol = 2 'FMNoCol = nCol + 6 j = 1 On Error Resume Next Application.DisplayAlerts = False Worksheets("Client Marketing").Delete Worksheets("No FM No").Delete Application.DisplayAlerts = True On Error GoTo 0 Worksheets.Add(After:=Worksheets(Worksheets.Count) ).Name _ = "Client Marketing" Worksheets.Add(After:=Worksheets(Worksheets.Count) ).Name _ = "No FM No" j = 1 k = 1 LastRow = Worksheets("Jobs 0104") _ .Cells(Rows.Count, nCol).End(xlUp).Row For i = 2 To LastRow If Left(Worksheets("Jobs 0104").Cells(i, nCol), 6) = "CLIENT" _ Or Left(Worksheets("Jobs 0104").Cells(i, nCol), 3) = "CMJ" Then With Worksheets("Client Marketing") * Worksheets("Jobs 0104").Cells(i, nCol).Copy Destination = .Cells(j, 1) * j = j + 1 End With Else If Worksheets("Jobs 0104").Cells(i, 8) = 0 Then Worksheets("Jobs 0104").Cells(i, nCol).Copy Destination = Worksheets("No FM No").Cells(k, 1) k = k + 1 End If End If Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cannot insert worksheet in exel - not available in insert menu | Excel Worksheet Functions | |||
insert row / insert column command buttons | Excel Worksheet Functions | |||
Can I auto insert a worksheet when I insert a value in a cell. | Excel Worksheet Functions | |||
Insert Next? Or insert a variable number of records...how? | Excel Discussion (Misc queries) | |||
Insert cell/format/text/fontsize and auto insert into header? | Excel Programming |