H
hotherps
I'm using the following code:
What I;m trying to do is add one more offset statement like this
And .Cells(x, y).Offset(0, -8).Value <> "IND" _
But from where the code starts I get an error because I'm using colum
G to start, which is the 7th column. I can start this code as late a
column O then there would be onough cells to look back -8.
But I can't figure out how to do it.
Thanks
With Sheet236
For x = 11 To 298
counter = 8
For n = 1 To timeStart
Next n
If .Cells(x, skilly).Value = "x" And did = False Then
For y = timeStart To timeStart + 7
If .Cells(x, y).Value = "." _
And counter < 9 _
And need > 0 _
And x >= 19 _
And .Cells(x, y).Value <> "" _
And .Cells(x, y).Offset(-8, 0).Value <> "IND" _
And .Cells(x, y).Offset(8, 0).Value <> "IND" _
And .Cells(x, y).Offset(0, 8).Value <> "IND" Then
_
.Cells(x, y).Offset(0, 0).Resize(1, 8).Value = "ENG"
'.Cells(x, y).Value = "ENG"
counter = counter + 1
need = need - 8
End I
What I;m trying to do is add one more offset statement like this
And .Cells(x, y).Offset(0, -8).Value <> "IND" _
But from where the code starts I get an error because I'm using colum
G to start, which is the 7th column. I can start this code as late a
column O then there would be onough cells to look back -8.
But I can't figure out how to do it.
Thanks
With Sheet236
For x = 11 To 298
counter = 8
For n = 1 To timeStart
Next n
If .Cells(x, skilly).Value = "x" And did = False Then
For y = timeStart To timeStart + 7
If .Cells(x, y).Value = "." _
And counter < 9 _
And need > 0 _
And x >= 19 _
And .Cells(x, y).Value <> "" _
And .Cells(x, y).Offset(-8, 0).Value <> "IND" _
And .Cells(x, y).Offset(8, 0).Value <> "IND" _
And .Cells(x, y).Offset(0, 8).Value <> "IND" Then
_
.Cells(x, y).Offset(0, 0).Resize(1, 8).Value = "ENG"
'.Cells(x, y).Value = "ENG"
counter = counter + 1
need = need - 8
End I