+ Reply to Thread
Results 1 to 5 of 5

select entire row of clicked cell in a table

Hybrid View

  1. #1
    Registered User
    Join Date
    03-29-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    22

    select entire row of clicked cell in a table

    I have been trying variations of this formula with no luck. Other ways have been successful in highlighting entire row of worksheets but I'm looking to target only the entire row of the table of the selected cell.

    After this determines whether the selected cell is in the required table

      
        If Not Intersect(Target, Range("Table3")) Is Nothing Then
        
           
    (Formula for entire row selection)
           
        Else
        
        do Nothing
    
            
        End If
    I would like to to then be able to highlight the entire row of the selected cell in the 'table1'.
     sel = ActiveCell.EntireRow
       
       Range(sel).Selection.Interior.Color = 12611584
    Many Thanks

  2. #2
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: select entire row of clicked cell in a table

    try

    
    rows(target.row & ":" & target.row).interior.color = 12611584

  3. #3
    Registered User
    Join Date
    03-29-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: select entire row of clicked cell in a table

    that unfortunately highlights entire worksheet row and not just the row of the selected table.

  4. #4
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: select entire row of clicked cell in a table

    Is your table a set range or does it change?

    If it is indeed static then you can hard code the correct range:

    
    range("C" & target.row & ":" & "H" & target.row).interior.color = 12611584
    (columns C & H chosen at random for example purposes)

  5. #5
    Registered User
    Join Date
    03-29-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: select entire row of clicked cell in a table

    yeah its a fixed range
    formula provided works . only if it were simpler like column selection 'Range("Table5[Notes]").Select'

    Thanks Anyway!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] code so that when a cell is clicked, a tick mark goes in the cell that was clicked
    By behnam in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2013, 01:17 PM
  2. Replies: 15
    Last Post: 04-14-2013, 12:59 PM
  3. [SOLVED] Select column A's cell in relation to the row that macro button was clicked on?
    By xlyfe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-09-2013, 12:24 PM
  4. run macros on entire network of computers once clicked
    By myjebay1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2012, 05:55 PM
  5. Change cell value when right-clicked/double-clicked
    By grime in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-17-2005, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1