98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Finding Current Address
Finding Current Address
Resolved · Low Priority · Version 2003
Tony has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Access Intermediate course
Access Advanced course
Finding Current Address
How do you find the address of the current cell. I have a sheet that has several columns of data. However, one column is not always full. Using CurrentRegion will tell me how many rows of data ther are and I want to delete the lines that are not complete (they will always be the last ones). I can find the last entry by looking up the part complete column from the bottom of the sheet. However, I do not know how to find the address of this cell to then use in a delete rows routine.
RE: Finding Current Address
Hi Tony
Thanks for your question
The address property of the selection object will give you what you need. For example the code below will return the address in a message box
MsgBox Selection.Address
Regards
Stephen
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Counting Non Number Cells (Text)If you try to use the COUNT FUNCTION =COUNT(Cell range)with a range of cells with numbers and or containing text fields you wil find that that the text cells will be excluded from the the count. If you want to include them try the the COUNTA FUNCTION =COUNTA(Cell range). This counts both text and number cell values. |