Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

how find first cell

Forum 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

ResolvedVersion 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 courses

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

VBA tip:

Stop Display Alerts In Excel

When creating or deleting a Worksheet in Excel you don't want Excel to inform you "A file already exists....." Or "Do you want to save this file...".

To stop these alerts happening use the following line of code:

Application.DisplayAlerts = False

After the Create or Delete routine use:

Application.DisplayAlerts = True

View all VBA hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.