+ Reply to Thread
Results 1 to 6 of 6

MID and FIND question

  1. #1
    Registered User
    Join Date
    10-23-2011
    Location
    SF, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    MID and FIND question

    So I have a column of long text strings that essentially are made up of '&'s followed by an alphabetic code, and then an '=', and finally, a bunch of numbers (varying lengths).

    here is a sample:

    ...&abc=123435&defg=54321&hijklmno=14&...

    I want to extract from the sample above the following:

    defg=54321

    I know Im always extracting defg=, but I do not know where it is in the cell, and I do not know how many numerals come after the = and before the following &.

    Any ideas??

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,691

    Re: MID and FIND question

    Is there always an & after the numbers following defg?

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    05-14-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    187

    Re: MID and FIND question

    hi

    Try this code and check whether it works.
    Put the Code in B1 and assuming that Column A has your data

    Code: =MID(A1,SEARCH("defg=",A1,1),10)

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,691

    Re: MID and FIND question

    I have attached a solution. I used helper columns so that you could see how each piece comes together. You can combine the columns to make one long formula if you like.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-23-2011
    Location
    SF, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: MID and FIND question

    Sorry, YES there is always an '&' after the numbers following defg=

    I'm testing out some theories now! Thanks for the help!

  6. #6
    Registered User
    Join Date
    10-23-2011
    Location
    SF, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: MID and FIND question

    This worked perfectly! Thank you very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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