Stephen_IV
Well-known Member
- Joined
- Mar 17, 2003
- Messages
- 1,180
- Office Version
- 365
- 2019
- Platform
- Windows
Good afternoon,
I have code below that will move the entirerow to Sheet2 if column A has an x in it. I am looking to adapt this code so that I could randomly select 96 people with out having an x in Column A. Any help will be greatly appreciated! Thanks in advance Stephen!
I have code below that will move the entirerow to Sheet2 if column A has an x in it. I am looking to adapt this code so that I could randomly select 96 people with out having an x in Column A. Any help will be greatly appreciated! Thanks in advance Stephen!
Code:
Sub moveit()
Dim r As Range
Set r = Range("a1:a3000")
For Each cell In r
If cell.Value = "x" Then
cell.EntireRow.Copy Sheets("sheet2").Range("a65536").End(xlUp)(2, 1)
End If
Next
End Sub