Finding the last two characters of the string below:
XM-160/42 Two Toned Leather Western Belt with Conchos - Size 42 
Some of the strings I have are longer and shorter that the one above.
This is what I would like to do with it:
1- I would like to find the last two charaters in the string.
2- I would like to change these two characters to a number.
and then
3. If the last two characters are greater that 42
    then file1 = 4.00
    else
   file1 = 0.00
			
			
			
				Read in the user guide about the RIGHT$ and VAL functions and I'll bet you can put something together.
			
			
			
				QuoteThis is what I would like to do with it:
1- I would like to find the last two characters in the string.
string x
x = "XM-160/42 Two Toned Leather Western Belt with Conchos - Size 42"
x = right$(x,2)Quote2- I would like to change these two characters to a number.
int n
n = val(x)Quoteand then
3. If the last two characters are greater that 42
    then file1 = 4.00
    else
   file1 = 0.00
if n > 42
     file1 = 4.00
else
         file1 = 0.00
endif
			 
			
			
				n = val(x) will not work.  val() expects the string variable passed to it to be numeric, which "XM" is not.  I am guessing that you will have some conversion between XM and a number?
And for the last 2 characters,   
x = left$(x,2)
if x > "42" then file1 = 4.00 else file1 = 0.00
Bill
			
			
			
				hi oneplace2u,
unless i'm mistaken, or billhsln lives in a country that reads left to right, then celphick's code should be what you need - i tested with latest ebasic and it works as expected.
cheers, DennisL.
			
			
			
				Sorry, North, East, West and South, I have no problems with.  Left and Right, I get confused.....
Bill