Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Highlight/Color Row (2003)

    Folks, I have many spreedsheets furnished by vendors which have in Col A their part number. The price may be many columns to the right, ie: Maybe column H. What I'd like to be able to do WITHOUT USING A MACRO is to highlight or color the row where the cursor is. By that I mean, if I do a Ctrl F search, on a part number in Col A. When the part number is found, the whole row is then Highlighted or Colored, allowing the eye to easy track to the right to the proper pricing column.

    I don't really expect this to be able to be done without VB...just hoping one of you gurus might have a fix.

    Ya'll let me know.

    Thanks
    Bobby

  2. #2
    3 Star Lounger
    Join Date
    Feb 2003
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight/Color Row (2003)

    You said this may be coming from a vendor? I'm wondering if the sheet is protected? If not then one way to avoid vb would be to Insert a new col between A and B. Then at the the top of this col (if there is a header in row one, then go to Cell B2 and enter =H2 (or whatever col has the price list). Then copy this formula down col B as far as needed. This would put the price ajacent to your part # for easier viewing.

    To do the highliting automatically would require code similar to :


    Option Explicit
    Sub FindPartNo()

    Dim MyPart as String
    MyPart = Inputbox("Enter the Part #")
    Range("A:A").Find (What:=MyPart).Select
    Selection.EntireRow.Interior.ColorIndex = 35

    End Sub

  3. #3
    New Lounger
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight/Color Row (2003)

    I have no idea how to use VB code.
    Attached is a very small sample. Hate to presuppose on you. Can you enter the code into the attached so I can see it in action. Col A is the part number.

    Thanks
    Bobby

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight/Color Row (2003)

    The only way I can think of to do it without VBA would be to click on the row index on the left side of the window to select the entire row after you do the search.
    Legare Coleman

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight/Color Row (2003)

    If you want to use this code with any workbook, then you should put the code into your Personal.xls. See <post#=118382>post 118382</post#>.
    Legare Coleman

  6. #6
    New Lounger
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight/Color Row (2003)

    Thanks,
    I'm gonna have to learn a little VBA...

  7. #7
    New Lounger
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight/Color Row (2003)

    I was able to get this Macro to work. Unfortunately, it leaves the color on the row after the cursor moves off of it. Also requires the macro to be run again to highlight the next row needed. Is there anyway, using VBA, to watch the cursor movement and highlight each row as the cursor moves over it and remove the highlight once the cusor leaves the row?
    Not asking for much am I? [img]/forums/images/smilies/smile.gif[/img]

    Thanks

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Ankeny, Iowa, USA
    Posts
    298
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight/Color Row (2003)

    You can try Chip Pearson's Row Liner add-in, available here. It looks like it might do what you're wanting.

    Another idea would be to just hide the columns between the part number and the price, then your price will be right next to the part number, no tracking across a page .

  9. #9
    3 Star Lounger
    Join Date
    Feb 2003
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlight/Color Row (2003)

    Bobby,
    try the attached file. I think it does what you have asked for.

Posting Permissions

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