Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Right Function 1

Status
Not open for further replies.

theSizz

Technical User
Apr 22, 2002
93
US
I'm trying to get the right function to return the last 2 characters from a field that contains numbers

For example the field RunDis contains numbers like:
11.41
12.55
10.06
15.30
etc

In a text box control I have this formula:
=Right([RunDis],2)

The text box returns the last two numbers except for the field that contains the value 15.30
In this case I get .3 as the returned string
How do I get the control to return 30 instead of .3?
I know that the Right Function operates on a string and these are numbers.
Can anyone offer the right code ?

Thanks for helping.
 
=Right(Format([RunDis],"0.00"),2)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Another way:
=(100*[RunDis]) Mod 100

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the quick reply PHV.

Should have realized it was a format thing........brain fart I guess.

Thanks again.
 
Hi PHV,

C'mon - desperation for top spot in TT is blinding your logic mate!
2 mins between posts - just to get in first, with 2nd post much more eloquent?

I know your name PHV, and names are powerful things [wink]

Lols

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top