VBA code: Moving to first cell in row

Mister_B

New Member
Joined
Aug 28, 2002
Messages
15
Help! I've been trying to figure out how to
start with any "active cell" and then tell it
to move to the first cell in the row, ie. move back to column A (even if there is data in cells in between. I've tried the specialcells, rows and others. I guess I'm just not using the correct syntax.

Any help will be greatly appreciated.

Dave
VBA newbie
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello Dave
Please Try this
Sub GotoFirstCellInrow()
Msgbox Activecell.End(xlUp).Address(False,False)
Range("A1").Select
End Sub
 
Upvote 0
Also :-

ActiveCell.EntireRow.Range("A1").Select

or

Range(ActiveCell.EntireRow.Address)(1, 1).Select
 
Upvote 0

Forum statistics

Threads
1,218,899
Messages
6,145,085
Members
450,590
Latest member
Naneng

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top