+ Reply to Thread
Results 1 to 7 of 7

Extract month number and year

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Extract month number and year

    I have text in Col a , months in Col b as well as Month in Col k and the applicable month period in Col L


    I have tried to set up a formula in Col c to extract the relevant period number for the month in Col b/the year in the text in Col A


    I have shown what the result should look like in Col D. I am trying to extract the period pertaining to a particular month (October being the first month in the financial year, November being the 2nd etc) and to show the period followed by the year for eg 1/2019, 2/2019 etc



    I have attached sample data


    It would be appreciated if someone could kindly provide me with a formula to do this
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Extract month number and year

    Please try at D2

    =TEXT(EOMONTH(MID(A2,16,20),3),"mm/yyyyy")

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,442

    Re: Extract month number and year

    You could just use VLOOKUP to get the period.k

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Extract month number and year

    Hi Guys


    Thanks for the help, much appreciated

  5. #5
    Registered User
    Join Date
    05-16-2017
    Location
    Minnesota
    MS-Off Ver
    Professional Plus 2013
    Posts
    9

    Re: Extract month number and year

    As there are always more ways to skin the cat to say, here is a way that I have also used...

    Please Login or Register  to view this content.
    The index match formula will look at the month entered and match to the month column and then return the month number, and then it will concatenate it the /2019 from the year in column A.
    Last edited by simmy51; 02-28-2019 at 12:34 PM. Reason: Changed the formula to pull date from A column

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,442

    Re: Extract month number and year

    You're welcome.

  7. #7
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Extract month number and year

    Thanks for the help Simmy51

+ 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] How to extract year and month from a date and combine them into a text
    By billj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-02-2017, 09:24 AM
  2. Extract month and year from a cell
    By Wojtek-AU in forum Excel - New Users/Basics
    Replies: 24
    Last Post: 08-15-2016, 02:56 AM
  3. [SOLVED] Extract Year, Month, Day from date
    By stoicy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-28-2016, 11:48 PM
  4. Extract Year, Month, Day from date
    By stoicy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2016, 01:41 PM
  5. [SOLVED] Formual to Extract month and year from sheet name
    By rizmomin in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-26-2014, 10:49 PM
  6. [SOLVED] formatting dates to automatically extract Year and month
    By alexcrofut in forum Excel General
    Replies: 1
    Last Post: 01-23-2014, 03:09 PM
  7. [SOLVED] Extract Year or Month only from a cell with date and time
    By djaurit in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2013, 04:03 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