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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

ltpeter-y

New Member
Joined
Aug 28, 2002
Messages
2
Hello Dave
Please Try this
Sub GotoFirstCellInrow()
Msgbox Activecell.End(xlUp).Address(False,False)
Range("A1").Select
End Sub
 
L

Legacy 7259

Guest
Also :-

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

or

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

Mister_B

New Member
Joined
Aug 28, 2002
Messages
15
Thanks again for your help with my question,
I truly appreciate all your time.

Dave
 

Mister_B

New Member
Joined
Aug 28, 2002
Messages
15
Thank you all for your responses. I truly
appreciate your time in helping me.

Dave
 

Forum statistics

Threads
1,147,844
Messages
5,743,512
Members
423,800
Latest member
IuneKeiki

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
Top