Hi all
I have a piece of code that runs through multiple tables (they vary in length) and replacing values. All in the same worksheet
My code looks like this:
Sub SelectCell()
Dim x, i&, j&, s$
Dim c As Variant
With Range("A90").CurrentRegion
Msg = Range("A90").CurrentRegion.Rows.Count
x = .Resize(.Rows.Count + 1).Value
For j = 3 To UBound(x, 2) Step 7
'Move to the next table
Range("C90").Select
c = Range(Selection, Selection.End(xlDown)).Rows.Count
For i = 2 To c
'I need the c range to move to the next table and then get the count
If x(i + 1, j - 2) = "Plate DRW" Then s = x(i + 1, j - 1)
x(i, j) = s
Next i
Next j
.Value = x
End With
End Sub
I can't figure out how i get c to move to the next table and count the rows in that.
In my code c stays constant, and I need it to change and match the new row count.
Br/Danny
Bookmarks