+ Reply to Thread
Results 1 to 2 of 2

String of dates convert to a from and to date

  1. #1
    Registered User
    Join Date
    03-12-2014
    Location
    North West
    MS-Off Ver
    Excel 2003
    Posts
    1

    String of dates convert to a from and to date

    Hi

    I have a spreadsheet with reference relating to dates that are listed as single days. I am trying to convert the single dates relating to a reference to a from and to date but i'm having problems.

    Example

    048051_141 10/09/2013
    048051_141 11/09/2013
    048051_141 12/09/2013
    048051_141 13/09/2013
    041929_141 15/10/2013
    041929_141 16/10/2013
    041929_141 17/10/2013
    041929_141 18/10/2013

    I want this to read

    048051_141 from - 10/09/2013 - to - 13/09/2013
    041929_141 from - 15/10/2013 - to -18/10/2013

    Is this possible and thanks for the help.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,737

    Re: String of dates convert to a from and to date

    you could use
    =A1&" From - "&TEXT(MIN(IF($A$1:$A$16=$A1,$B$1:$B$16)),"DD/MM/YYYY")&" - to - "&TEXT(MAX(IF($A$1:$A$16=$A1,$B$1:$B$16)),"DD/MM/YYYY")
    and format as an array using
    control+shift+enter
    rather than just enter

    But can you pull out the codes and put in a cell - say D2 down

    then you can use
    =D2&" From - "&TEXT(MIN(IF($A$1:$A$16=$D2,$B$1:$B$16)),"DD/MM/YYYY")&" - to - "&TEXT(MAX(IF($A$1:$A$16=$D2,$B$1:$B$16)),"DD/MM/YYYY")

    see attached
    column H
    Attached Files Attached Files
    Last edited by etaf; 03-12-2014 at 12:18 PM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ 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] Convert date from string, some dates coming out wrong
    By Uther_d_dragon in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2014, 10:02 AM
  2. Assistance needed (Have to convert string of numbers into dates)
    By connmtc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2013, 08:23 PM
  3. Convert a Date String
    By funkmanusa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2011, 09:26 AM
  4. Convert string dates to proper numerical date format
    By Codpops in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-21-2008, 01:01 PM
  5. How to convert string to a date
    By galsaba in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-04-2005, 02:06 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