+ Reply to Thread
Results 1 to 7 of 7

how to get excell to locate certain characters

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

    how to get excell to locate certain characters

    hi.

    i have a long list of what used to be file names that look like this:
    2013.6.26,MAGAMA 219641,ZANUAH,QD(2.48),SSD(2.58),WA(3.4)-OK.pdf

    each segment of that line has meaning.
    what i need is a command that i can put in a box on the spreadsheet that tells it to scan this line, find, for example, the letters QD, and return the number in the prentices next to those letters.

    can this even be done?

    yours,
    yoni

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

    Re: how to get excell to locate certain characters

    Hi,

    I'm afaid you're going to have to be a bit more specific: "find, for example, the letters QD,..." does not tell us what the other 'examples' of strings to find are.

    Could your problem perhaps be rephrased? For example, is it the case that every string in parentheses is to be returned (into separate cells)? Or are there also strings within parentheses that are not to be returned?

    Either way, you'll need to provide more information in order for a meaningful solution to be reached.

    Regards
    Click * below if this answer helped

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

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: how to get excell to locate certain characters

    assuming text in A1 and example letters to find in B1 then

    =TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(MID(A1,FIND(B1,A1),LEN(A1)),B1&"(",""),")",REPT(" ",255)),255))*1
    Cheers
    Andy
    www.andypope.info

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

    Re: how to get excell to locate certain characters

    well, the end result im trying to create is a table where one column will be composd entirely of lines like te one i pasted, while the other columns will be QD, SSD, WA and other letter combinations that exist in other lines. each such letter combinaton always has parentheses next to it. the idea is to make the values in the parentheses appear in the box which is intersected by the row the line is in and the column that represents that letter combination.

    something like the attacjed file (i hope the attachment was succesful).

    what im trying to do is make the columns "find" the letter combinations on their own inside the line of text and automatically copy the value in the parentheses next to that letter combination into the box.

    regards
    yoni
    Attached Files Attached Files
    Last edited by yoniratner; 09-12-2013 at 09:19 AM.

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

    Re: how to get excell to locate certain characters

    Then just use Andy's solution but amended for your ranges, e.g. in B2 and copy across and down:

    =TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(MID($A2,FIND(B$1,$A2),LEN($A2)),B$1&"(",""),")",REPT(" ",255)),255))*1

    Note that this will fail in cell E3 as your desired return (NC,136) is text. Removing the *1 at the end of the above formula will rectify this, though will also have the drawback that all your results are now textual, rather than numeric.

    Regards

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

    Re: how to get excell to locate certain characters

    works great

    thanks

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: how to get excell to locate certain characters

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Excell magic to open an excell sheet at a predetermined time
    By catchnanan in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-11-2013, 08:21 PM
  2. create a slides show with excell spreadsheets using excell
    By wantabepas in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-16-2006, 02:50 PM
  3. [SOLVED] Addon program for excell to locate muliple entries in a list
    By stef in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-19-2006, 08:30 AM
  4. Replies: 1
    Last Post: 02-22-2006, 06:30 PM
  5. Replies: 1
    Last Post: 02-16-2005, 04:27 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