Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everybody , and have a pleasant Sunday
I have this code : Sub macro55() Application.ScreenUpdating = True Dim FromWks1 As Worksheet Dim DestWks As Worksheet Dim NextRow As Long Dim myCell As Range Dim myRng1 As Range Set FromWks1 = Workbooks("polo2x.xls").Worksheets("1") Set DestWks = Workbooks("polo2x.xls").Worksheets("1") With FromWks1 Set myRng1 = .Range("BA11:BA100") End With With DestWks For Each myCell In myRng1.Cells If myCell < 3 Then myCell = myCell.Value + 1 Else: myCell.Offset(0, -4).Select Selection.Cut Selection.End(xlToLeft).Offset(0, 1).Select ActiveSheet.Paste End If Next myCell Application.CutCopyMode = False Application.ScreenUpdating = True End With End Sub Can it be removed the Select and Selection ?, (for speeding up this code ) . Thank you very much ! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range("Reset Sheet!F13").Select Makes VBA Code Fail | Excel Programming | |||
VB Script: Code for "Sheets in selection" | Excel Discussion (Misc queries) | |||
macro stops on "selection.autofilter" line of code | Excel Programming | |||
Fix Code: Select Case and "Contains" selection | Excel Programming | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming |