+ Reply to Thread
Results 1 to 3 of 3

Formula's for calculating 1) year 2)month and 3)weeknum for when date is blank

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    Limerick, Ireland
    MS-Off Ver
    Excel 2016
    Posts
    52

    Formula's for calculating 1) year 2)month and 3)weeknum for when date is blank

    Hi,

    I have the following 3 formulas
    =TEXT(A4,"YYYY")
    =TEXT(A4,"MMM")
    =WEEKNUM(A4)

    I would like to modify these formulas so that where if A4 is blank the formula to returns a blank cell rather than 1900 for year or Jan for month

    Thanks.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula's for calculating 1) year 2)month and 3)weeknum for when date is blank

    Try

    =IF(A4="","",TEXT(A4,"YYYY"))

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula's for calculating 1) year 2)month and 3)weeknum for when date is blank

    For the TEXT functions you could also use this approach

    =TEXT(A4,"YYYY;;")
    Audere est facere

+ 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. Need to convert Month/Date/Year to Year/Month/Date so excel will recognize
    By juliettelam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2014, 04:17 PM
  2. [SOLVED] Calculating stats by week instead of month - WEEKNUM?
    By Beginner9 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2014, 11:56 AM
  3. calculating month to date, year to date, week to date
    By labogola in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2014, 05:21 AM
  4. Year, Month, Day, Weeknum functions in a macro
    By gathrawnca in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-05-2010, 10:28 PM
  5. formula for prior month & year of a month end date.
    By mikeburg in forum Excel General
    Replies: 2
    Last Post: 09-25-2007, 04:01 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