Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

Select entire row from any cell

Is the a piece of code that will enable me to select the entire row and copy that row from the cell I have landed on. i.e. My macro looks for a specific word, when it finds the word it selects the cell. Lets say I am on cell P32, can I then select the entire row 32?

I am using 2010

Thank you
Avatar of wobbled
wobbled
Flag of United Kingdom of Great Britain and Northern Ireland image

If you have selected the cell it is simply


ActiveCell.Row

eg

MsgBox "The row is " & ActiveCell.Row
and if you want to go on and select that row

Dim x As Long
x = ActiveCell.Row

Rows(x).Select
ASKER CERTIFIED SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or
activecell.entirerow.copy
Avatar of Jagwarman
Jagwarman

ASKER

brilliant
Thank you