Can someone please help me figure out why this code doesn't do anything when I run it. I do not get any error message, I click run and then nothing ever happens. I've looked over it enough and I'm blind to what is missing. Any and all help is very appreciated!
The goal of this code is to filter through column G and if the name in the cell matches a name in OS() then it will copy that whole row into a sheet with their name. I removed their names for this example.
The goal of this code is to filter through column G and if the name in the cell matches a name in OS() then it will copy that whole row into a sheet with their name. I removed their names for this example.
VBA Code:
Dim OS(1 To 8) As String
Dim LR As String
OS(1) = "name"
OS(2) = "name"
OS(3) = "name"
OS(4) = "name"
OS(5) = "name"
OS(6) = "name"
OS(7) = "name"
OS(8) = "name"
outside = 1
rowcounter = 2
For outside = 1 To 8
Do Until Sheets("Input").Cells(rowcounter, 1) = "EXIT"
If Sheets("Input").Cells(rowcounter, "G") = OS(outside) Then
LR = Sheets(OS(outside)).Cells(Rows.Count, 1).End(xlUp).Row + 1
For col = 1 To 9
Sheets(OS(outside)).Cells(LR, col) = Sheets(OS(outside)).Cells(rowcounter, col)
Next
Else
End If
rowcounter = rowcounter + 1
Loop
Next