I'm trying to set a range to a particular cell in Col D but I don't know the row number because this can vary depending on the amount of data entered.
At present my code looks like this
Code
Dim MyCount as Integer
Dim r1 as Range
'No of rows in Col D
MyCount = Range("A2:D2", Range("A2:D2").End(xlDown)).Rows.Count
Set r1 = Range(Cells(MyCount, 4))
The problem is with my line
Any help much appreciated