+ Reply to Thread
Results 1 to 4 of 4

Changing Dates to Days

  1. #1
    Registered User
    Join Date
    10-19-2020
    Location
    Surrey, UK
    MS-Off Ver
    365
    Posts
    10

    Changing Dates to Days

    Good evening. I have a table of data where the month and days are provided like:

    2 M 14 D

    I need to convert this to number of days, assuming the month is 30 days, so for the above would be 74

    Grateful if your clever minds can help.

    Thanks

  2. #2
    Registered User
    Join Date
    10-19-2020
    Location
    Surrey, UK
    MS-Off Ver
    365
    Posts
    10

    Re: Changing Dates to Days

    Sorry i should add the format changes so could be
    3 M 13 D
    4 M 12 D
    4 M 22 D
    4 M 1 D

  3. #3
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Changing Dates to Days

    is that data in separate columns or all in the same column/cell
    If it is like the attached pic, try this formula (assuming you will always use 30 days)

    Please Login or Register  to view this content.
    copy down.
    Attached Images Attached Images
    Last edited by cubangt; 08-11-2021 at 02:48 PM.
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Changing Dates to Days

    If your data is all in one cell, formatted as number of months-space-M-space-number of days-space-D then you can use this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Edit: the above assumes that the number of months will not be more than two digits. If you could have more than 99 M, use this instead:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Aardigspook; 08-11-2021 at 03:14 PM.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

+ 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. Total Amount of Days Between Two Dates Using Alternate Days as a Variable
    By williamome in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2021, 03:31 AM
  2. [SOLVED] Calculating Years, Months, Week, Days, Hours, Minutes for Work Days between two dates
    By hecgroups in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-23-2019, 12:09 AM
  3. Replies: 7
    Last Post: 08-19-2019, 07:28 AM
  4. Replies: 10
    Last Post: 02-19-2019, 03:28 AM
  5. Replies: 0
    Last Post: 10-31-2014, 10:32 AM
  6. [SOLVED] Subtract Two Dates By The Number of Days, But Only Inlcude Work Days
    By ptho16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-16-2012, 11:31 AM
  7. Changing 24hr days into 7.5 business days
    By jaywizz in forum Excel General
    Replies: 2
    Last Post: 10-18-2010, 05:43 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