[EXCEL] Select a row when clicking a cell

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

LeBob

Thread Starter
Joined
Sep 2, 2004
Messages
3
Hi,

I drill down in the excel help and don't find my answer :confused: so, HELPPPP !!!
Is there anyone who knows how to select an entire row when you select one cell in it.
What I mean is when I select C4 cell I want (I hope) that excel automatically selects the row number 4 (as if I select this row by clicking its number).

Thanks.
 
Joined
Sep 4, 2003
Messages
4,916
Right click on the sheet name along the bottom of the workbook and select VIEW CODE and then paste the following code into the blank module window. Save the workbook and give it a try.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Rows(ActiveCell.Row).Select

End Sub

Rollin
 
Joined
Jul 25, 2004
Messages
5,458
If you don't want this to fire everytime, which Rollin's will do, the keyboard shortcut is Shift + Spacebar.
 

LeBob

Thread Starter
Joined
Sep 2, 2004
Messages
3
Les gars vous êtes géniaux !!!
Folks you're great

Well a great thanks to everyone.
The simpliest (Shft Space) is the winner for my use but all your VB examples are welcomed.
Shame on me ! I have to learn VB right now, I promise !!!

Thanks again
Bob
 
Joined
Jul 25, 2004
Messages
5,458
Glad it worked out for ya Bob!

Btw, what does "Les gars vous êtes géniaux" mean?

Take care!
 

LeBob

Thread Starter
Joined
Sep 2, 2004
Messages
3
I'm a frenchy that's why I said

Guys you are inspired / full of genius !

or

You're genius

but maybe the translation can't be so linear ?
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top