+ Reply to Thread
Results 1 to 4 of 4

Match a cell against a named range

  1. #1
    Registered User
    Join Date
    12-18-2009
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Match a cell against a named range

    I am struggling with most probably a straight forward problem, but here goes. I want to write some VB coding to match cell values to a list I have already made "Stock" so that only rows with the values that don't match get highlighted in red. My problem is being able to reference the list "Stock" in VB - is it possible?

    Sheet 1 contains my named ranges, and sheet 2 is where data gets entered. So basically is there any way to say if Activecell is found in named range then color no fill, if not color red.

    Thanks in advance. I'm sure it's not as simple as I'm trying to make it. Eventually it might build to names and not just numbers that I'm looking up as well.

    Please Login or Register  to view this content.
    Last edited by bignowa; 11-02-2011 at 06:27 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Match a cell against a named range

    bignowa,

    Why not use conditional formatting? See attached
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Match a cell against a named range

    Hi

    Not sure why conditional formatting wouldn't be a better option.

    Put up an example workbook for review.

    rylo

  4. #4
    Registered User
    Join Date
    12-18-2009
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Match a cell against a named range

    I was just thinking about conditional formatting but I wasn't quite sure how to set up the formula, but I think this will definitely do the trick. Thanks for your help!

+ 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