Hi, I had created a macro is looping for some values in one sheet and then copy valid rows to other sheets. However, I would like to amend macro only to copy entire rows to selected column, like A-I. Is there any way to do that? Pasting my macro below:
Many thanks for help.Sub CopyRows() Dim bottomL As Long Dim x As Long bottomL = Sheets("Sales").Range("h" & Rows.Count).End(xlUp).Row: x = 1 Dim c As Range Application.ScreenUpdating = False Application.Calculation = xlCalculateManual For Each c In Sheets("Sales").Range("h2:h" & bottomL) If c.Value = "89" Then c.EntireRow.Copy Worksheets("RL").Range("A" & x) x = x + 1 End If Next c bottomL = Sheets("Sales").Range("h" & Rows.Count).End(xlUp).Row: x = 1 For Each c In Sheets("Sales").Range("h2:h" & bottomL) If c.Value = "31" Then c.EntireRow.Copy Worksheets("OC").Range("A" & x) x = x + 1 End If Next c End Sub
Bookmarks