H
hotherps
Hi I'm using the following code, that places text values in a row a
specific points in the row. The problem is that sometimes the value
exceed the range of the defined range that I'm working in
The overall range is G11:CX15
But if a cell has a value greater than "" and that value is less tha
32 cells from end of the range. It will start adding values out of th
range.
Is there a way I can make the code stopanytime it tries to go beyond C
?
Thanks.
For Each cell In Range("G11:CP287")
If cell.Value > "" Then
If (cell.Offset(0, -1) = "") Then
cell.Offset(0, 7).Value = "Brk"
cell.Offset(0, 14).Value = "Lun"
cell.Offset(0, 15).Value = "Lun"
cell.Offset(0, 24).Value = "Brk"
End If
End I
specific points in the row. The problem is that sometimes the value
exceed the range of the defined range that I'm working in
The overall range is G11:CX15
But if a cell has a value greater than "" and that value is less tha
32 cells from end of the range. It will start adding values out of th
range.
Is there a way I can make the code stopanytime it tries to go beyond C
?
Thanks.
For Each cell In Range("G11:CP287")
If cell.Value > "" Then
If (cell.Offset(0, -1) = "") Then
cell.Offset(0, 7).Value = "Brk"
cell.Offset(0, 14).Value = "Lun"
cell.Offset(0, 15).Value = "Lun"
cell.Offset(0, 24).Value = "Brk"
End If
End I