+ Reply to Thread
Results 1 to 4 of 4

date function or text function recommended? to display mmm-yy when year is cell A1

  1. #1
    Registered User
    Join Date
    04-29-2020
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    34

    date function or text function recommended? to display mmm-yy when year is cell A1

    I'm moving a table from a sheet that represented the current year, to a sheet representing a specific year. Each column title was a month. I'm wanting the new sheets column titles to be in the format of mmm-yy where the year is pulled from cell A1. Not really sure what the problem is as using each one of these formulas comes up with a different result... Please advise.

    The column titles are in U6-AF6
    Each example below A1 = 2020 and should display JAN-20

    =DATE(1,1,$A$1) < - displays Jul-06
    =CONCATENATE("Jan-",TEXT($A$1,"yy")) < - displays Jan-05
    =CONCATENATE("Jan-",($A$1)) < - displays Jan-2020


    What am I doing wrong? Should i use the DATEVALUE function?

    Thanks
    Murph
    Last edited by BigPapaMurf; 06-27-2020 at 04:40 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: date function or text function recommended? to display mmm-yy when year is cell A1

    What you need to understand about dates and times in excel is…

    a date is just a number representing the number of days passed since 1/1/900...and then formatted in a way that we recognize as a date. So, for instance, today (Sat 27 Jun 2020) is actually 44009

    Time is actually a decimal part of 1 (day), so 06:00 AM is 0.25, 12 noon is 0.5 and 18:00 (or 6 PM) is 0.75

    DATE() needs year 1st, then month then day
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-29-2020
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    34

    Re: date function or text function recommended? to display mmm-yy when year is cell A1

    Thanks! That worked.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: date function or text function recommended? to display mmm-yy when year is cell A1

    Happy to help

+ 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: 4
    Last Post: 10-07-2018, 04:35 PM
  2. Replies: 4
    Last Post: 08-24-2016, 09:29 AM
  3. [SOLVED] Use TEXT function as Criteria on Sumifs to convert month/year to date format
    By chico.corrales in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2012, 07:49 PM
  4. [SOLVED] Function to Display Input Box, Retrieve Date, and Return Day, Month And Year
    By Authentik8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2012, 08:04 AM
  5. [SOLVED] Is there a function for a 'year to date' sum
    By Duke Carey in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 03:05 PM
  6. Is there a function for a 'year to date' sum
    By Mal in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  7. [SOLVED] Is there a function for a 'year to date' sum
    By Mal in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

Tags for this Thread

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