ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do I select cells in column A thru F in the active row? (https://www.excelbanter.com/excel-programming/337999-how-do-i-select-cells-column-thru-f-active-row.html)

jonco

how do I select cells in column A thru F in the active row?
 
What I'm tring to do is select cells in column A thru F in whatever row is
active no matter what cell in what column is active.

I know it's simple but I forgot how to do it. Thanks
Jon



Rowan[_2_]

how do I select cells in column A thru F in the active row?
 
One way:

Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell.Row, 6)).Select

Regards
Rowan

"jonco" wrote:

What I'm tring to do is select cells in column A thru F in whatever row is
active no matter what cell in what column is active.

I know it's simple but I forgot how to do it. Thanks
Jon




Jim Thomlinson[_4_]

how do I select cells in column A thru F in the active row?
 
Place this code into the worksheet (Right Click the tab and select View Code)


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo ErrorHandler
Application.EnableEvents = False
Range(Cells(Target.Row, "A"), Cells(Target.Row, "F")).Select
ErrorHandler:
Application.EnableEvents = True
End Sub

--
HTH...

Jim Thomlinson


"jonco" wrote:

What I'm tring to do is select cells in column A thru F in whatever row is
active no matter what cell in what column is active.

I know it's simple but I forgot how to do it. Thanks
Jon




jonco

how do I select cells in column A thru F in the active row?
 
Thanks guys. Perfect.





Bob Umlas

how do I select cells in column A thru F in the active row?
 
A bit easier/shorter:
Cells(ActiveCell.Row,1).Resize(1,6).Select
Bob Umlas
Excel MVP


"Rowan" wrote in message
...
One way:

Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell.Row, 6)).Select

Regards
Rowan

"jonco" wrote:

What I'm tring to do is select cells in column A thru F in whatever row
is
active no matter what cell in what column is active.

I know it's simple but I forgot how to do it. Thanks
Jon







All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com