+ Reply to Thread
Results 1 to 6 of 6

Determine if a single date is in a cell which contains multiple dates

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,666

    Determine if a single date is in a cell which contains multiple dates

    Hi, i am enclosing a sheet to help explain. But basically, i have in cell A1 a string of dates and they are NOT in order. I have a list of dates in column B and what i want to know is if the date say in cell B1 is in the list of dates shown in cell A1.

    Not sure how to do this. i tried converting cell A1 to text using Text(B1,"m/dd/yyyy") and then using countif but this didnot work.

    Any thoughts?
    Attached Files Attached Files

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,283

    Re: Determine if a single date is in a cell which contains multiple dates

    Try:

    =ISNUMBER(SEARCH(" "&TEXT(B1,"m/d/yyyy")," "&$A$1))+0
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,795

    Re: Determine if a single date is in a cell which contains multiple dates

    =if(isnumber(search(text(b1,"m/d/yyyy"),$a$1,1)),1,0)
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,466

    Re: Determine if a single date is in a cell which contains multiple dates

    This works for me:

    =IFERROR(LOOKUP(99999,SEARCH(TEXT(B1,"m/d/yyyy"),A1),"YES"),"NO")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,283

    Re: Determine if a single date is in a cell which contains multiple dates

    You need to delimit the data in some way, so that you don't get false matches with say a search for 2/1/2022 matching 12/1/2022

  6. #6
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,666

    Re: Determine if a single date is in a cell which contains multiple dates

    hi all, thanks to everyone who responded. I tried all the suggestions.......rorya's is the only one that really works because of the reason he mentioned. but thank you ALL very much!!!!!!!!!!!

+ 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. Replies: 2
    Last Post: 02-17-2021, 02:11 AM
  2. Replies: 1
    Last Post: 01-16-2018, 02:28 AM
  3. Replies: 1
    Last Post: 04-06-2016, 07:02 AM
  4. Replies: 5
    Last Post: 04-10-2014, 06:43 AM
  5. Create Date Array with all dates between Min and Max (Single Cell Solution)
    By gus_7475 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-24-2013, 12:36 PM
  6. [SOLVED] Date Filter based on Cell Input - single date or range of dates
    By babaloo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2012, 10:32 AM
  7. Replies: 2
    Last Post: 01-12-2006, 12:25 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