go to the beginning of the row

bmacias

Board Regular
Joined
Sep 11, 2002
Messages
215
What is the command to tell VBA-Excel to activate the first cell in a row. (ie) If I'm in cell H8 how do I get to H1. I will not always know what cell address I'm at, so I can't use the "offset" the way I know it.

Thanks for your help
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

rikrak

Active Member
Joined
Aug 21, 2002
Messages
255
' go to first cell in row
Cells(ActiveCell.Row, 1).Select
' go to first cell in column
Cells(1, ActiveCell.Column).Select
 

Forum statistics

Threads
1,181,103
Messages
5,928,088
Members
436,587
Latest member
Slicesofquince

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