Home Error in finding last used cell in VBA
Reply: 0

Error in finding last used cell in VBA

user365
1#
user365 Published in June 20, 2018, 1:23 pm

When I want to find the last used cell value, I use:

Dim LastRow As Long

LastRow = Range("E4:E48").End(xlDown).Row

Debug.Print LastRow

I am getting the wrong output when I put a single element into a cell. But when I put more than one value into the cell, the output is correct. What's the reason behind this?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.6445 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO