+ Reply to Thread
Results 1 to 13 of 13

Help with MID and FIND function...!

  1. #1
    Registered User
    Join Date
    04-13-2012
    Location
    Kolkata
    MS-Off Ver
    Excel 2007
    Posts
    30

    Help with MID and FIND function...!

    Hi friends suppose i have a data in
    A1= U.S Buyer id: 525-554 DONE
    What i wanna want in B2=525-554
    so i tried this formula in B2 =MID(A1,FIND("id:",A1)+4,LEN(A1)-FIND("id:",A1))
    but i am getting 525-554 DONE in B2....
    I dont want the done..how can i customize it for getting just what i need i mean starting from 5 till a space is encountered...?? Or just till 7 count..??? Please show me d correct way.
    Thanks,
    rishi.ssh

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help with MID and FIND function...!

    try:

    =TRIM(LEFT(TRIM(MID(A1,FIND("id:",A1)+3,255)),FIND(" ",TRIM(MID(A1,FIND("id:",A1)+3,255)))))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-13-2012
    Location
    Kolkata
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Help with MID and FIND function...!

    Ya this is working only when the desired value is accompanied with a space and other values...like if there is just Buyer id: 525-554 it returns error...?? And my each cells have vast amount of data more than 1500 characters....will it help..?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help with MID and FIND function...!

    Try this change:

    =TRIM(LEFT(TRIM(MID(A2,FIND("id:",A2)+3,255)),FIND(" ",TRIM(MID(A2,FIND("id:",A2)+3,255))&" ")))
    Last edited by NBVC; 06-13-2012 at 05:18 PM.

  5. #5
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Help with MID and FIND function...!

    Quote Originally Posted by rishi.ssh View Post
    Or just till 7 count..??? Please show me d correct way.
    if you just want 7 chars then

    =MID(A1,FIND("id:",A1)+4,7)
    Regards,
    Vandan

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help with MID and FIND function...!

    Quote Originally Posted by vandan_tanna View Post
    if you just want 7 chars then

    =MID(A1,FIND("id:",A1)+4,7)
    I didn't catch that... good catch.

  7. #7
    Registered User
    Join Date
    04-13-2012
    Location
    Kolkata
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Help with MID and FIND function...!

    hey thanlx vandan and Nvpm.. It worked...Friends can a macro be created that pulles and extract data from Similar cells and post it in corresponding Row with Customer id...like i got the way to extract id also my cells contains comission: -$value (it can be of any amount min of 2 and max of 4 characters) in Column B and C respectively....like in a1 both data are present ..i want that a macro could do this form me in Column B the Id and in Column C the comission against that Id...can this be possible..?? I will be grateful to you if u could make this happen.

  8. #8
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Help with MID and FIND function...!

    Rishi:

    Start a new thread for this new request. P lease attach a file in this new thread so we get a better idea of your needs.

    If you are satisfied with the answer for your original post, then please mark this thread solved.

  9. #9
    Registered User
    Join Date
    04-13-2012
    Location
    Kolkata
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Help with MID and FIND function...!

    But the comission value can be of variable length...... Like -$1.5 or -$18.63 or -$212.36 which can also be followed by other things after a space ofcourse in that case i think i need to use that trim function.

  10. #10
    Registered User
    Join Date
    04-13-2012
    Location
    Kolkata
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Help with MID and FIND function...!

    Ok vandan..i will mark this thread as solved..thanks alot....and i guess i have already started a thread for it..but no replies since 2 days...

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Help with MID and FIND function...!

    Hi rishi.ssh,

    Try:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  12. #12
    Registered User
    Join Date
    04-13-2012
    Location
    Kolkata
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Help with MID and FIND function...!

    Hey Xladept.. thankx buddy.

  13. #13
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Help with MID and FIND function...!

    Hey rishi.ssh...You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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