+ Reply to Thread
Results 1 to 7 of 7

Need to check if cell value is equal to a named range (of dates)

  1. #1
    Forum Contributor
    Join Date
    07-08-2012
    Location
    beirut
    MS-Off Ver
    Excel 2010
    Posts
    102

    Need to check if cell value is equal to a named range (of dates)

    Hi, I want to check if the value of certain cells is equal to one of the dates in sheet 2, named "holiday", and then input certain characters in them.
    I provided a sample, in which case the code only checks if the cells in sheet 1 are equal to sheet 2, cells A2 and A3; how can I write a better code where it would check all my named range ( "Holiday" in sheet 2)? Thanks
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by chiidzzz; 09-18-2017 at 03:36 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to check if cell value is equal to a named range (of dates)

    A start:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    07-08-2012
    Location
    beirut
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Need to check if cell value is equal to a named range (of dates)

    Thanks for your reply, it works except for the last cell in "Holiday" range, (A5) "3-Oct". Tuesday 3 must be "-" instead of "o".

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to check if cell value is equal to a named range (of dates)

    Thanks for the rep! Did you want every field checked - what about the "x" & "A"? Working on it now.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to check if cell value is equal to a named range (of dates)

    Try this:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-08-2012
    Location
    beirut
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Need to check if cell value is equal to a named range (of dates)

    Perfect, thanks again

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to check if cell value is equal to a named range (of dates)

    You're welcome!

+ 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] Check if cell is a named range
    By amphinomos in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-27-2015, 12:15 PM
  2. check for match of cell to range of cells only if another cell is equal to X
    By rfigueroa1976 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-25-2015, 07:51 PM
  3. Count if cell range dates are equal to monday
    By suban.p in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-13-2014, 10:12 AM
  4. If Dates in range equal today then copy cell x
    By Greg420 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 15
    Last Post: 03-20-2014, 09:47 AM
  5. Replies: 1
    Last Post: 02-27-2013, 12:00 AM
  6. Check if cell is part of a named range
    By RobynC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2008, 02:31 PM
  7. Replies: 1
    Last Post: 05-25-2006, 04:55 AM

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