+ Reply to Thread
Results 1 to 6 of 6

Formula for dates to quarters? 7/1/2023 to 3Q23; 12/1/2023 to 4Q23; 1/1/2024 to 1Q24

  1. #1
    Registered User
    Join Date
    11-08-2017
    Location
    Seattle
    MS-Off Ver
    2010
    Posts
    26

    Formula for dates to quarters? 7/1/2023 to 3Q23; 12/1/2023 to 4Q23; 1/1/2024 to 1Q24

    Book1-date to quarter format.xlsx

    Hi, I'm trying to come up with a simple formula to convert dates to the following quarter format: #Q##.

    Examples:
    1. 7/1/2023 to 3Q23
    2. 12/1/2023 to 4Q23
    3. 1/1/2024 to 1Q24

    Sample workbook is attached and need to populate column D with the formula. Thanks.

  2. #2
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Formula for dates to quarters? 7/1/2023 to 3Q23; 12/1/2023 to 4Q23; 1/1/2024 to 1Q24

    Please try

    =LOOKUP(MONTH(C4),{1,4,7,10},{1,2,3,4})&"Q"&TEXT(C4,"YY")

    Regards.

  3. #3
    Registered User
    Join Date
    11-08-2017
    Location
    Seattle
    MS-Off Ver
    2010
    Posts
    26

    Re: Formula for dates to quarters? 7/1/2023 to 3Q23; 12/1/2023 to 4Q23; 1/1/2024 to 1Q24

    Thanks. Harder for me to follow with the integers. Any simpler formula using the "LEFT" and "RIGHT" functions?

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 VersionVersion 2501 Win 11
    Posts
    24,424

    Re: Formula for dates to quarters? 7/1/2023 to 3Q23; 12/1/2023 to 4Q23; 1/1/2024 to 1Q24

    An alternative with Power Query

    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.

    Excel 2016 (Windows) 64 bit
    A
    B
    C
    D
    1
    Column1 Column1 Quarter.1
    2
    7/1/2023
    7/1/2023
    3/2023
    3
    12/1/2023
    12/1/2023
    4/2023
    4
    1/1/2024
    1/1/2024
    1/2024
    Sheet: Sheet1
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,633

    Re: Formula for dates to quarters? 7/1/2023 to 3Q23; 12/1/2023 to 4Q23; 1/1/2024 to 1Q24

    Quote Originally Posted by StanLeakup View Post
    Thanks. Harder for me to follow with the integers. Any simpler formula using the "LEFT" and "RIGHT" functions?
    Excel treats date as number, like this:
    1-Jul-2023 = 45108
    How Left and Right can manage this?
    Quang PT

  6. #6
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,387

    Re: Formula for dates to quarters? 7/1/2023 to 3Q23; 12/1/2023 to 4Q23; 1/1/2024 to 1Q24

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Call in the Cavalry 2023
    By Glenn Kennedy in forum The Water Cooler
    Replies: 81
    Last Post: 01-13-2024, 12:55 AM
  2. New to Forum--Feb 2023
    By DebB3 in forum Hello..Introduce yourself
    Replies: 3
    Last Post: 02-15-2023, 01:27 PM
  3. Need Formula to Convert this Date Format 2023.02.28 to this 28-Feb-2023
    By gr445854 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-11-2023, 07:04 PM
  4. Replies: 1
    Last Post: 02-03-2023, 04:54 PM
  5. Run-Time Error 2023
    By SKINRIP in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-23-2022, 09:52 AM
  6. [SOLVED] Can't Scroll to Year 2023
    By BobBrown60 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-28-2021, 03:23 PM
  7. [SOLVED] Error 2023: How to identify cell in For Each Loop?
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-12-2018, 12:21 AM

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