Results 1 to 7 of 7

Truncation problem

This is a discussion on Truncation problem within the Excel Questions forums, part of the Question Forums category; Good Morning; I have the following rows: Annie Pledger vs. Baptist Hospital Ricardo Martinez, individually and as next friend of ...

  1. #1
    Board Regular
    Join Date
    Jul 2002
    Posts
    240

    Default Truncation problem

    Good Morning;

    I have the following rows:

    Annie Pledger vs. Baptist Hospital
    Ricardo Martinez, individually and as next friend of Ricardo Martinez, Jr. and Natividad Lujan, as temporary administrator of the Estate of Maria De La Luz Martinez vs. Germinal Nunez, M.D., Pedro A. Ortega, M.D., Tracie M. Kelley, R.N., Junita Gomes, L.V.N., Herminia Lopez, L.V.N. and Yseleta General Hospital, a corporation, jointly and severally
    Guillermo Alvidrez vs. St. Joseph Hospital of El Paso, Texas, a non-profit corporation
    Virginia A. Wilson vs. Haltom General Hospital and T&R Clinic, a professional association
    Mary Dorothy Griffin vs. Medina Memorial Hospital


    when I use the following command"=RIGHT(A2,FIND(" vs. ",A2)) I get the following result :
    tist Hospital
    M.D., Pedro A. Ortega, M.D., Tracie M. Kelley, R.N., Junita Gomes, L.V.N., Herminia Lopez, L.V.N. and Yseleta General Hospital, a corporation, jointly and severally
    profit corporation
    sional association
    na Memorial Hospital
    If you notice the first few characters after the 'vs." is missing. How do I go about fixing this problem.

  2. #2
    MrExcel MVP TommyGun's Avatar
    Join Date
    Dec 2002
    Location
    Clear Lake, TX
    Posts
    4,202

    Default Re: Truncation problem

    The FIND command will find where the text starts. Therefore, you are not returning enough data. Try this...

    =RIGHT(A2,FIND(" vs. ",A2)+5)

  3. #3
    Board Regular Chitosunday's Avatar
    Join Date
    Jul 2003
    Posts
    1,017

    Default

    You did'nt mention what you are trying to do when you made the formula =right(a2,find("vs"... . Did you put it in all the row of each line?
    Mr Young at Heart - Learning is like chasing the wind, it's boundless.

  4. #4
    Board Regular
    Join Date
    Jul 2002
    Posts
    240

    Default Re: Truncation problem

    Tommygun;

    Will I have to change the +5 to different number based on each row????? or is there a way to make it genaric.

  5. #5
    MrExcel MVP TommyGun's Avatar
    Join Date
    Dec 2002
    Location
    Clear Lake, TX
    Posts
    4,202

    Default Re: Truncation problem

    5 is the number of characters in " vs. " so it will not need to be adjusted.

  6. #6
    Board Regular
    Join Date
    Jul 2002
    Posts
    240

    Default Re: Truncation problem

    Thnaks

  7. #7
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    58,750

    Default Re: Truncation problem

    Quote Originally Posted by TommyGun
    The FIND command will find where the text starts. Therefore, you are not returning enough data. Try this...

    =RIGHT(A2,FIND(" vs. ",A2)+5)
    I think it should be:

    =RIGHT(A2,LEN(A2)-FIND(" vs. ",A2)-4)

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
  •  


DMCA.com