Find 1st Empty Cell: How to?

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hello, this has got me stumped. Being fairly new I hope you'll bear with me.
I have selected cellA1:A500 and sorted it so that only filled cells appear
from A1 onwards. However I'm never sure where the filled range will end and
want to store the 1st empty cellname in a variable too shorten my read loop.
But how do I determine the 1st empty cell?

thanks for any help.
Chris
 
You can use this Chris

Range("A" & Rows.Count).End(xlUp).row
This wis the last cell with a value inn column A

For Myrow = 1 To Range("A" & Rows.Count).End(xlUp).row
 
set rng = Range("A1:A500").Specialcells(xlblanks)(1)


or

set rng = cells(rows.count,1).End(xlup)(2)
 
Thanks!
Ron de Bruin said:
You can use this Chris

Range("A" & Rows.Count).End(xlUp).row
This wis the last cell with a value inn column A

For Myrow = 1 To Range("A" & Rows.Count).End(xlUp).row
 
Back
Top