+ Reply to Thread
Results 1 to 10 of 10

VBA code to highlight a range when cell value is FB01

  1. #1
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    VBA code to highlight a range when cell value is FB01

    Hi,
    I need to highlight the range from A to K where the Column G contains FB01. It will be great if somebody can help me with a VBA code. As I will append it after some existing code.
    At present I am using this code but it's highlighting the entire row. Also it's taking a lot of time as I believe i am making some mistake.
    Please Login or Register  to view this content.
    Thanks for all your help.
    Regards,me

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: VBA code to highlight a range when cell value is FB01

    try this
    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA code to highlight a range when cell value is FB01

    Please Login or Register  to view this content.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA code to highlight a range when cell value is FB01

    or
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: VBA code to highlight a range when cell value is FB01

    Hi,
    I just updated the value due to some changes required, however it all the code is not working. am I making some mistake.please guide. I am attaching the case file.
    Thanks for all your help,
    regards,me
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA code to highlight a range when cell value is FB01

    Which column do we need to look at and what is the criteria?

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA code to highlight a range when cell value is FB01

    maybe so
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: VBA code to highlight a range when cell value is FB01

    @nilem
    Perfect, that's exactly what I wanted ! :D

    Just to understand the way the code works, how do I edit the code if I want to search for "Sys 101" in Col B and highlight it ?

    @AB33
    the code runs perfectly fine, but when the sheet name is different the code it not working, can you please help me out in this regard.

    I will be very thankful if you somebody can help me out.
    best regards,me
    Last edited by fatalcore; 03-29-2013 at 05:04 PM. Reason: update

  9. #9
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA code to highlight a range when cell value is FB01

    Quote Originally Posted by fatalcore View Post
    ... to search for "Sys 101" in Col B and highlight it
    try it
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: VBA code to highlight a range when cell value is FB01

    Awesome ! :D

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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