1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

[EXCEL] Select a row when clicking a cell

Discussion in 'Business Applications' started by LeBob, Sep 2, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. LeBob

    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.
     
  2. Anne Troy

    Anne Troy

    Joined:
    Feb 14, 1999
    Messages:
    11,746
    First Name:
    Anne
  3. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    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
     
  4. Anne Troy

    Anne Troy

    Joined:
    Feb 14, 1999
    Messages:
    11,746
    First Name:
    Anne
    That was simple enuf, Rollin. Can I steal it? :)
     
  5. Zack Barresse

    Zack Barresse

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

    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
     
  7. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Glad it worked out for ya Bob!

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

    Take care!
     
  8. LeBob

    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 ?
     
  9. Sponsor

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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/269308

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice