+ Reply to Thread
Results 1 to 4 of 4

Formula to extract year and month from two columns if missing

  1. #1
    Forum Contributor
    Join Date
    10-02-2012
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    161

    Formula to extract year and month from two columns if missing

    Hi All,
    From the Data sheet, I need to capture Year, month and Qtr based on available date in two columns C and D. If Date is available for column D (Releasedate), extract year from it and if missing, extract year from col B. How to set a formula.

    Also, how can I refresh a pivot for addition/deletion of new records in data sheet
    Please check attached excel for input data
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-19-2021
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Formula to extract year and month from two columns if missing

    Please Login or Register  to view this content.
    in cell E2 and drag down

    As far as refreshing data, the data tab at the top has a refresh all button.
    Last edited by AliGW; 07-21-2021 at 02:55 AM. Reason: PLEASE don't quote unnecessarily!

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, Suffolk (England), but grew up in Sawley, Derbyshire
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2211 (Windows 11 22H2 64-bit)
    Posts
    65,402

    Re: Formula to extract year and month from two columns if missing

    In E2:

    =IF(D2="",YEAR(C2),YEAR(D2))

    In F2:

    =IF(D2="",TEXT(C2,"mmm"),TEXT(D2,"mmm"))

    In G2:

    =LOOKUP(IF(D2="",MONTH(C2),MONTH(D2)),{1,4,7,10},{"Q1","Q2","Q3","Q4"})
    Ali


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


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

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

    Re: Formula to extract year and month from two columns if missing

    Thanks for the rep.

+ 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 to extract day.month and year in format dd/mm/yyyy
    By Howardc1001 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2021, 11:27 AM
  2. [SOLVED] Formula to extract Data based on Month & Year
    By Howardc1001 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-17-2020, 09:17 AM
  3. [SOLVED] Formula to extract the last or highest month and year
    By Howardc1001 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-01-2020, 01:33 AM
  4. [SOLVED] extract date information into week month and year columns
    By jitterbug888 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2020, 04:04 AM
  5. [SOLVED] formula to extract month and year
    By Howardc1001 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 07-25-2019, 01:24 PM
  6. x axis, whole year data range, missing month lables?
    By HJay in forum Excel Charting & Pivots
    Replies: 15
    Last Post: 07-16-2008, 06:21 AM
  7. x axis, whole year data range, missing month lables?
    By HJay in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-20-2007, 04:47 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