hello,
i am new to VBA coding so i might be headed in the wrong direction with this code.
i am trying to build a loop that loops and X amount of times or untill the column is empty.
here is what i have so far:
Sub Test1()
'UpdatebyExtendoffice20161222
Dim x As Integer
Application.ScreenUpdating = False
' Set numrows = number of rows of data.
NumRows = Range("i2")
' Select cell a1.
Range("A1").Select
' Establish "For" loop to loop "numrows" number of times.
For x = 1 To NumRows
Cells(x, 1).Interior.ColorIndex = 37
' Selects cell down 1 row from active cell.
ActiveCell.Offset(1, 0).Select
Next
Application.ScreenUpdating = True
End Sub
i am able to loop it once and that is about it.
the idea is to change the background color depending on how many orders each person will get .
so if i have 300 order and 5 people that day then everyone gets 60 orders.
the loop will run 5 times , and highlight 60 orders one color then 60 in another color.
any and all help will be welcome.
i am new to VBA coding so i might be headed in the wrong direction with this code.
i am trying to build a loop that loops and X amount of times or untill the column is empty.
here is what i have so far:
Sub Test1()
'UpdatebyExtendoffice20161222
Dim x As Integer
Application.ScreenUpdating = False
' Set numrows = number of rows of data.
NumRows = Range("i2")
' Select cell a1.
Range("A1").Select
' Establish "For" loop to loop "numrows" number of times.
For x = 1 To NumRows
Cells(x, 1).Interior.ColorIndex = 37
' Selects cell down 1 row from active cell.
ActiveCell.Offset(1, 0).Select
Next
Application.ScreenUpdating = True
End Sub
i am able to loop it once and that is about it.
the idea is to change the background color depending on how many orders each person will get .
so if i have 300 order and 5 people that day then everyone gets 60 orders.
the loop will run 5 times , and highlight 60 orders one color then 60 in another color.
any and all help will be welcome.