+ Reply to Thread
Results 1 to 2 of 2

get nearest month/day/year that hasn't passed from two digit number with formula

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    Smile get nearest month/day/year that hasn't passed from two digit number with formula

    Hello everyone,

    I need a formula that can get the nearest month/day/year from a two digit day. It also cannot by a month/day/year that is in the future. So lets say today is 12/01/2017 and I have two digit numbers of 28, 11, and 01. I would then get back these dates: 11/28/2017, 11/11/2017, and 12/01/2017.

    Thanks a lot for the help

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: get nearest month/day/year that hasn't passed from two digit number with formula

    Assuming 28,11,1 in A2:A4.
    B1: =Today()

    B2: =DATE(YEAR($B$1),MONTH($B$1)-1*(DAY($B$1)<A2),DAY(A2))
    Copy down.

    Edit: If it's two digit number stored as text. Replace A2 with A2*1. To coerce text into number.
    Last edited by CK76; 12-01-2017 at 02:11 PM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

+ 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] Formula for number of weeks in a month each year
    By Anarchus in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-01-2017, 02:18 AM
  2. [SOLVED] Count the number of Saturdays that have passed in a month so far
    By Badvgood in forum Excel General
    Replies: 9
    Last Post: 03-16-2014, 04:07 PM
  3. 2-digit month, day & year
    By handerson0603 in forum Excel General
    Replies: 4
    Last Post: 11-01-2012, 09:27 PM
  4. Replies: 4
    Last Post: 02-24-2012, 08:12 AM
  5. [SOLVED] convert number to month and year in formula
    By Soth in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-19-2006, 03:35 PM
  6. Result of date as Month-2 digit Year
    By Linda in forum Excel General
    Replies: 3
    Last Post: 06-04-2005, 12:05 PM
  7. Replies: 5
    Last Post: 02-19-2005, 07:06 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