fredlo2010
06-01-2012, 05:19 PM
Hi,
Is there a way to select the last used cell in a table?
There is a possibility that my data has some empty spaces in it. No more than two consecutive rows.
I was thinking to select a cell as long as its empty and its value is equal to the one below.
Dim i As Variant
For Each i In Range("A1:A207")
If Cells(i, 1).Value = "" And Cells(i, 1) = Cells(i + 1, 1) Then
Cells(i, 1).Select
End If
Exit For
Next i
This is my extremely inexperienced code. It does not work but you get the idea. Its a little frustrating when you have the algorithm in your head and you just don't have or know the tools to implement it.
I guess practice will help me with that part :think:
Feedback is the best way for me to learn
Is there a way to select the last used cell in a table?
There is a possibility that my data has some empty spaces in it. No more than two consecutive rows.
I was thinking to select a cell as long as its empty and its value is equal to the one below.
Dim i As Variant
For Each i In Range("A1:A207")
If Cells(i, 1).Value = "" And Cells(i, 1) = Cells(i + 1, 1) Then
Cells(i, 1).Select
End If
Exit For
Next i
This is my extremely inexperienced code. It does not work but you get the idea. Its a little frustrating when you have the algorithm in your head and you just don't have or know the tools to implement it.
I guess practice will help me with that part :think:
Feedback is the best way for me to learn