+ Reply to Thread
Results 1 to 11 of 11

copying date from text.

  1. #1
    Registered User
    Join Date
    09-12-2013
    Location
    Jerusalem, Israel
    MS-Off Ver
    Excel 2007
    Posts
    9

    copying date from text.

    hello

    i have a long list in excel 2007 of what used to be file names that look like this:

    2013.6.26,MAGAMA 219642,ZANUAH,PSD(NC,136),UCS(26.7),PL(2.9)-OK.pdf

    i previously used this forum to extract the data from these file names, using variations of this formula:

    =TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(MID(A1,FIND(B1,A1),LEN(A1)),B1&"(",""),")",REPT(" ",255)),255))*1

    this worked wonderfully but now i need some more help.

    what i need to do now is to:
    1. take just the date at the beginning of the text and put it in a seperate box.
    2. take just the first word after the date and put that in a seperate box.
    3. take just the number after the word in (2) and put it in a seperate box.
    4. take the word right after the number in (3) and put it in another box.
    5. when it takes the data from the parenthases after PSD, i need it to put the NC (could be either C or NC) in one box and the number in another box.
    6. take the OK at the end and put it in a box (could be OK, ER or UC).

    thanks in advance
    yoni

  2. #2
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: copying date from text.

    Please ginve some more information on the text strings:
    - are the commas and spaces etc the same in every string?
    - are the lengths of the parts of the string the same in every string (e.g. are the variations of the "MAGAMA" part always 6 characters)?
    When I say semicolon, u say comma!

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: copying date from text.

    Agreed with L-Drr. Also, this type of question has a much better chance of being correctly answered if it is accompanied by not only a clear explanation of the format of the strings involved but also with as many examples (with desired results in each case) as possible.

    Giving just one example, unless it is perfectly representative of all strings to be examined, is likely to result in at best many more questions and at worst incorrect answers.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Registered User
    Join Date
    09-12-2013
    Location
    Jerusalem, Israel
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: copying date from text.

    the dates and numbers are all in the same format and length,the commas and spaces are all the same. the length of the words, like MAGAMA or ZANUAH do very.

    attached is an example i made manually.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: copying date from text.

    lol its weird working from right to left but ill see what i can do

  6. #6
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: copying date from text.

    ehm... are you sure the dates are all the same length? so no dates in october, november or december (2 digits)?

  7. #7
    Registered User
    Join Date
    09-12-2013
    Location
    Jerusalem, Israel
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: copying date from text.

    yeah tell me about it, hebrew makes all office programs a hassel.

  8. #8
    Registered User
    Join Date
    09-12-2013
    Location
    Jerusalem, Israel
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: copying date from text.

    L-Drr: it was originally a mistake made by the people who named the files, but luckaly there are no lab reports from october so we're good. in the future this may change, but if you guys can help me now then when re-formated entries come in im sure ill find a way to adjust the command myself.

  9. #9
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: copying date from text.

    Here you are.
    Be careful: if 1 of the codes like WA or QD is also in a word like MAGAMA, you'll get wrong results. but I guess this is not the case
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: copying date from text.

    sorry 1 mistake with the NC/C, hold up

  11. #11
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: copying date from text.

    fixed. in your example you didnt split up the "NC,136", like you said in your first post, so i also didn't do that. if you still want to, please tell me
    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. [SOLVED] Copying text from one cell to another cell using a Date ref & Header ref within a row
    By Jedidog1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-01-2013, 02:16 PM
  2. Copying Text from MS Word into Text Box in Excel
    By qwe789123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2010, 08:43 PM
  3. Copying out the date from a cell containing both date and time
    By michaelkwc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2008, 05:24 AM
  4. [SOLVED] [SOLVED] Truncated text when copying text from one excel doc to another
    By sunny pete in forum Excel General
    Replies: 3
    Last Post: 08-12-2005, 03:05 PM
  5. Text not copying as text from Word to Excel 2003
    By Christine in forum Excel General
    Replies: 4
    Last Post: 03-03-2005, 08: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