+ Reply to Thread
Results 1 to 8 of 8

Return the oldest date when cell does not contain an *(Asterix)

  1. #1
    Registered User
    Join Date
    02-09-2017
    Location
    UK
    MS-Off Ver
    2019
    Posts
    59

    Return the oldest date when cell does not contain an *(Asterix)

    Hi All

    I have a set of data where I need to find the oldest entry based on two criteria. The data set includes an * and this is what I need to be able to find (and not find) and return the oldest date. I have been able to find a formula which will allow me to find the oldest date where an * is present:

    Please Login or Register  to view this content.
    but I am having no luck being able to amend it to find the oldest date where * is not present. I have attached a very simple workbook with my problem. Unfortunately I am aunable to remove the * from the data.

    Can anyone help?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Return the oldest date when cell does not contain an *(Asterix)

    You can use this array* formula in G5:

    =MAX(IF(B1:B10="Type3",C1:C10))

    *Note that an array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE), rather than the usual < Enter >.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-09-2017
    Location
    UK
    MS-Off Ver
    2019
    Posts
    59

    Re: Return the oldest date when cell does not contain an *(Asterix)

    thanks for the reply, that helps me with my original question, I now have a follow up!
    If I add another column of data in column D and this cells are either blank or contain an *, how can I find the oldest based on whether column D is blank or contains an *? (as well as matching the type3 in column B?

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Return the oldest date when cell does not contain an *(Asterix)

    I'm not sure if you still have asterisks in column B or not. Assuming you have, then you can use this array* formula:

    =MAX(IF((ISNUMBER(SEARCH("Type3",B1:B10)))*(ISNUMBER(SEARCH("*",D1:D10))),C1:C10))

    This looks for "Type 3" in column B (but it could be "*Type3" or "Type3*") and looks for an asterisk anywhere in column D cells. If column D can only contain either an asterisk or a blank, then you can use this array* formula:

    =MAX(IF((ISNUMBER(SEARCH("Type3",B1:B10)))*(D1:D10="*"),C1:C10))

    If column B only contains "Typex", i.e. no asterisks, then you could use this array* formula:

    =MAX(IF((B1:B10="Type3")*(D1:D10="*"),C1:C10))

    and if you want to look for blanks in column D then you can use this*:

    =MAX(IF((B1:B10="Type3")*(D1:D10=""),C1:C10))

    *Don't forget to commit using Ctrl-Shift-Enter, as previously advised.

    Hope this helps.

    Pete

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Return the oldest date when cell does not contain an *(Asterix)

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Return the oldest date when cell does not contain an *(Asterix)

    Technically this
    SEARCH("*",D1:D10)
    searches for any text, not an asterisk. Since the only options are blank cell or *, it should work for the purposes of the OP though.

    FIND might be a safer option as it does not accept wildcards.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  7. #7
    Registered User
    Join Date
    02-09-2017
    Location
    UK
    MS-Off Ver
    2019
    Posts
    59

    Re: Return the oldest date when cell does not contain an *(Asterix)

    thanks for the help!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Return the oldest date when cell does not contain an *(Asterix)

    You're welcome - thanks for the rep.

    Pete

+ 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. Return oldest date in range when a file is open
    By mementomori in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-08-2016, 10:17 AM
  2. Replies: 1
    Last Post: 10-28-2015, 02:22 PM
  3. Return oldest date with some dates excluded
    By Stromming in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-30-2014, 06:32 AM
  4. return oldest date based on call value
    By 288enzo in forum Excel General
    Replies: 8
    Last Post: 02-28-2014, 10:50 PM
  5. look up with cell range, concatentate and text that includes the asterix
    By joolzh13 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-25-2013, 07:57 AM
  6. Show me the oldest date and adjacent cell contents
    By jhiltabidel in forum Excel General
    Replies: 6
    Last Post: 06-25-2011, 01:10 PM
  7. Lookup Adjacent Cell Values based on Newest and Oldest Date
    By nevi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2008, 02:27 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