+ Reply to Thread
Results 1 to 5 of 5

If active cell value dosn't match in range then highlight the active cell

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

    If active cell value dosn't match in range then highlight the active cell

    Hi,
    In range f4:f100 active cell value not found in range sheet1.range(d3:d300)
    Then highlight the active cell
    With worksheet change event
    Thank you
    Last edited by HaroonSid; 06-17-2017 at 11:59 AM.
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: If active cell value dosn't match in range then highlight the active cell

    Can you give an example of the result you want when active cell in sheet "Sheet1" is not in the range d3:d300
    "highlight the active cell" in which sheet ?
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    08-08-2014
    Location
    Lancaster, PA
    MS-Off Ver
    2016 (windows & mac)
    Posts
    94

    Re: If active cell value dosn't match in range then highlight the active cell

    The below code should do what you're looking for, it will work for multiple cells and non-contiguous ranges

    Please Login or Register  to view this content.
    As you didn't specific how you wanted the cell highlighted I have changed it's background color to yellow - just swap this line out for an alternative method to highlight the cell, don't forget to also swap out the line to re-set the highlight effect after the Else clause

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

    Re: If active cell value dosn't match in range then highlight the active cell

    absolute perfect and fast code

    i big thank to you mr thatandyward

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

    Re: If active cell value dosn't match in range then highlight the active cell

    @pci
    highlight the active cell of range f4:f100

+ 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. Auto highlight row & column of active cell without deleting existing cell colour
    By claire_wilson in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-22-2017, 08:31 PM
  2. Highlight active cell
    By christian2016 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2016, 08:03 PM
  3. Highlight active cell
    By calsam1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2016, 11:24 AM
  4. [SOLVED] Highlight active cell, un-highlight when no longer active?
    By cdterry in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2013, 02:39 PM
  5. Highlight Active Row macro, and Bold the Active Cell
    By StudentTeacher in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2013, 07:43 PM
  6. Replies: 2
    Last Post: 12-23-2012, 09:26 AM
  7. Active cell highlight
    By E in forum Excel General
    Replies: 11
    Last Post: 12-13-2005, 12: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