most
Board Regular
- Joined
- Feb 22, 2011
- Messages
- 107
- Office Version
- 365
- 2019
- Platform
- Windows
- Mobile
This script creates a lot of empty rows in the arrays. I understand why, but I don't know how to write the code so it won't, some pointers please.
Code:
Sub GroundogDay() Dim i As Integer
Dim Count As Integer
Dim ArrDATE(1 To 33) As Variant
Dim ArrROW(1 To 33) As Variant
For i = 3 To 33
If Sheets("Feb").Range("A" & i).Value = "Monday" Then
ArrDATE(i) = Sheets("Feb").Range("B" & i).Value
ArrROW(i) = Sheets("Feb").Range("A" & i).Row
Else
End If
Next i
For i = LBound(ArrDATE) To UBound(ArrDATE)
Debug.Print ArrDATE(i)
Next i
For i = LBound(ArrROW) To UBound(ArrROW)
Debug.Print ArrROW(i)
Next i
End Sub