Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

HIghlight Rows in Excel based on Cursor location

Posted on 2011-10-14
6
7,125 Views
Last Modified: 2012-05-12
Is there a way to highlight the row the cursor is on in Excel so that it makes it easier to know which row you are on?  
0
Comment
Question by:ITworks
6 Comments
 

Assisted Solution

by:mnasr333
mnasr333 earned 125 total points
ID: 36971635
0
 
LVL 10

Accepted Solution

by:
broro183 earned 250 total points
ID: 36972987
Hi,

Here are a two more possibilities:

Chip Pearson's addin looks good: http://www.cpearson.com/excel/RowLiner.htm 

John McGimpsey has alternative code (copy & paste into your project in the VBE) http://www.mcgimpsey.com/excel/highlightrow.html 

However I think that both of these will disable your ability to "Undo" in excel.

Rob
0
 
LVL 18

Assisted Solution

by:krishnakrkc
krishnakrkc earned 125 total points
ID: 36973051
Hi,

Another one.

Kris


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
    '// Developed by Kris @ ExcelFox.com
    
    Dim x, nmRow    As Name
    
    'if A1 holds '0', the macro won't fire
    If Me.Range("A1") = 0 Then Exit Sub 'adjust the flag cell
        
    On Error Resume Next
    Set nmRow = ThisWorkbook.Names("tRow")
    On Error GoTo 0
    
    Const HighlightColor As Long = 6750207

    If nmRow Is Nothing Then
        Set nmRow = ThisWorkbook.Names.Add("tRow", Target.Row & "|" & Target.EntireRow.Interior.Color, 0)
        Target.EntireRow.Interior.Color = HighlightColor
    Else
        x = Split(Evaluate("tRow"), "|")
        Me.Rows(CLng(x(0))).Interior.Color = IIf(CLng(x(1)) = 16777215, -4142, CLng(x(1)))
        nmRow.RefersTo = Target.Row & "|" & Target.EntireRow.Interior.Color
        Target.EntireRow.Interior.Color = HighlightColor
    End If

End Sub

Open in new window

0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 4

Author Closing Comment

by:ITworks
ID: 36974204
Thanks for all your help.  I am using the Chip Pearson's addin.....this was SUPER EASY to setup.
0
 
LVL 10

Expert Comment

by:broro183
ID: 36974363
Great, I'm pleased we could help :-)

Rob
0
 

Expert Comment

by:dewright22
ID: 37420212
Chris Pearson's add-on is perfect - just what I wanted and more. Thanks Chris.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This video discusses moving either the default database or any database to a new volume.

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question