|
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
The UK's most regular instructor-led training courses.
Training information: excel microsoft training
· Excel london Resolved · Medium Priority · Version 2003
How to find first cell with text
by - delegate Adriana [1 post] (2008 Apr 1 Tue, 16:30) Reply
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
Related articles
· Company Roles in Visual Basic Training
· What Is Microsoft Excel VBA and How Can It Help You Work Smarter?
Please browse our web site to find out more about
excel microsoft training and other Microsoft training courses. | Vba tip:
Stop Screen Flickering When Running Code
Running VBA code may cause the screen to flicker as the monitor is the slowest part of the program and cannot keep up with the very fast changes taking place.
To switch off the screen until the program is run enter the following code line:
Application.ScreenUpdating = False
The screen comes on automatically on completion of the program.
View all VBA hints and tips |
|