Truncation problem :: MrExcel Message Board


 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Truncation problem
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

nnadimi19
Board Master


Joined: 15 Jul 2002
Posts: 123


Status: Offline

 Reply with quote  

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.

Post Fri Sep 19, 2003 2:22 pm 
 View user's profile Send private message

TommyGun
MrExcel MVP


Joined: 10 Dec 2002
Posts: 3397
Location: Clear Lake, TX
Flag: Usa

Status: Offline

 Reply with quote  

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)

Post Fri Sep 19, 2003 2:34 pm 
 View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

Chitosunday
Board Master


Joined: 14 Jul 2003
Posts: 423

Flag: Philippines

Status: Offline

 Reply with quote  

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.

Post Fri Sep 19, 2003 2:34 pm 
 View user's profile Send private message Send e-mail MSN Messenger

nnadimi19
Board Master


Joined: 15 Jul 2002
Posts: 123


Status: Offline

 Reply with quote  

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.

Post Fri Sep 19, 2003 2:55 pm 
 View user's profile Send private message

TommyGun
MrExcel MVP


Joined: 10 Dec 2002
Posts: 3397
Location: Clear Lake, TX
Flag: Usa

Status: Offline

 Reply with quote  

Re: Truncation problem

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

Post Fri Sep 19, 2003 2:59 pm 
 View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

nnadimi19
Board Master


Joined: 15 Jul 2002
Posts: 123


Status: Offline

 Reply with quote  

Re: Truncation problem

Thnaks

Post Fri Sep 19, 2003 3:11 pm 
 View user's profile Send private message

Andrew Poulsom
MrExcel MVP


Joined: 22 Jul 2002
Posts: 8266

Flag: Uk

Status: Offline

 Reply with quote  

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)

Post Fri Sep 19, 2003 3:23 pm 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.