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 VBA Training and help » How to find first cell with text
How to find first cell with text
Resolved · Medium Priority · Version 2003
Adriana has attended:
Excel VBA Intro Intermediate course
How to find first cell with text
How can I find the address of the first cell with Text in Column A starting from A1 using Ctl and Arrow down?
RE: How to find first cell with text
Hi Adriana
Sorry for the delay
To find the address of the first cell with text in Column A you can use the following code:
Sub FindCellAddress()
Dim CellAddress As String
Range("A1").End(xlDown).Select 'Selects the first cell in ColumnA with text
CellAddress = ActiveCell.Address 'Saves the address as a string in the variable
MsgBox CellAddress 'View the saved address
End Sub
Hope this helps
Carlos
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. |
VBA tip:Use VbNullString instead ofWhen needing to default a String variable back to it's default of "" use vbNullString as in the following example: |