+ Reply to Thread
Results 1 to 12 of 12

Hightlight a range of row when a cell selected Solved by : sktneer

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Thumbs up Hightlight a range of row when a cell selected Solved by : sktneer

    hello evryone

    i have data in range c10:h100

    i want if select a cell e.g = c15 then

    highlight the range c10:c100 with color

    now highlight the all row only highlight defined range

    thanx
    Last edited by HaroonSid; 04-02-2014 at 08:35 AM. Reason: solved

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Hightlight a range of row then a cell selectedddd

    Not sure that what do you want exactly? But try this code to see if this is what you want....This code is for Worksheet Selection Change Event.
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Post Re: Hightlight a range of row then a cell selectedddd

    hello sktneer
    thanx for fast reply

    i want to highlight row not column

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Hightlight a range of row when a cell selectedddd

    Quote Originally Posted by haroon2015 View Post
    i want if select a cell e.g = c15 then

    highlight the range c10:c100 with color
    Then what did you write here?
    Range C10:C100 exists in C column.
    Probably you haven't explained well.
    OK no problem.
    Now tell me if you select any cell in the Range C10:H100 (say C15 as per your example), do you want to highlight the row 15 or what?

  5. #5
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Hightlight a range of row when a cell selectedddd

    ya u right i haven't explained well

    if i select c15
    then highlight with color c15:h15 only

    if i select d20
    then highlight with color c20:h20 only

    if i select e25
    then highlight with color c25:h25 only
    Last edited by HaroonSid; 04-02-2014 at 08:22 AM.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Hightlight a range of row when a cell selectedddd

    The code is exactly doing what you are asking.
    If you select D20, it will highlight the range D10:D100. Isn't it? What else you want?

    See the attachment.
    Attached Files Attached Files

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Hightlight a range of row when a cell selectedddd

    OK. So you edited your reply. I will be back, let me correct the code.

  8. #8
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Hightlight a range of row when a cell selectedddd

    yup sorry to wasting ur time and power

    i edited my reply #5

    thanx

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Hightlight a range of row when a cell selectedddd

    Now see the attachment with the code which does what you want.
    Attached Files Attached Files

  10. #10
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Hightlight a range of row when a cell selectedddd

    yup sktneer


    that's it what i need....................

    thanx alot

    u deserve +1


    best regards
    haroon2015

  11. #11
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Hightlight a range of row when a cell selected Solved by : sktneer

    Glad to help you. Thanks for the feedback.
    If that takes care of your question, please mark your thread as solved.

  12. #12
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Hightlight a range of row when a cell selected Solved by : sktneer

    Solved
    already done

+ 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] Hightlight a range of row then a cell selected
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-02-2014, 08:50 AM
  2. [SOLVED] how to make range of cell A14:q14 and cell selected in to email vba code issue
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-23-2013, 12:06 PM
  3. [SOLVED] Trying to Find selected cell content within another worksheet cell range.
    By Craigside in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-13-2012, 04:36 PM
  4. How to find cell with max value in selected range
    By Igzilla in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2011, 04:29 PM
  5. Replies: 11
    Last Post: 08-31-2010, 01:30 PM

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