View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
arno arno is offline
external usenet poster
 
Posts: 184
Default Deleting certain string within the string

Hi Sam,

so it can be six
or seven marks long.

....
There is a blank between code and description.


then your formula for a code+text in B1 is:
=RIGHT(B1,LEN(A1)-FIND(" ",B1))

This formula searches for the first blank in the text and takes
everything from there to the end of the string (you have to know how
long your string is (LEN), at which position the blank is (FIND) - then
you know how many characters you have to take from the right end of the
text (RIGHT)).

Do NOT use other functions (eg. trim) to manipulate the resulting
string unless it is absolutely neccessary! E. g. there could be a
reason for blanks to be where they are.

arno