Questions King Posted November 21, 2006 Share Posted November 21, 2006 Hi all, How can I get the number like this: My number field 10,[color:red]567.89 Now I need to get the number [color:red]5, can this be done? I was using Left function but can't do it. Any Idea? Thank for reply! Link to comment Share on other sites More sharing options...
mr_vodka Posted November 21, 2006 Share Posted November 21, 2006 You need to supply more information with this. Why are you doing this? Are you looking for the number '5' or are you looking for the third digit from the decimal point (hundred) Link to comment Share on other sites More sharing options...
Tim W Posted November 21, 2006 Share Posted November 21, 2006 Hi, One tidbit if you need to use a text function, convert the number to text using GetAsText(number) like so. Filter(GetAsText(12345.60);"5") would return = 5 Tim Link to comment Share on other sites More sharing options...
Søren Dyhr Posted November 21, 2006 Share Posted November 21, 2006 Here's my stab at it: Let([tt=Int(entry);ss=Length(tt)]; Replace ( tt ; ss-2; 1 ; "," & TextColor(Middle ( tt ; ss-2 ; 1 );16711680)) & "." & Middle(entry-tt & "00";2;2)) Provided you wish to colour the digit red in a text field with the number string ...otherwise can you tear appart the components to get what you're after. --sd Link to comment Share on other sites More sharing options...
Questions King Posted November 22, 2006 Author Share Posted November 22, 2006 Hi mr_vodka, You are right! I'm looking for the third digit from the decimal point and not only third digit I need to looking up all the digit one by one. Like: Amount field - 10,567.89 Field 1 - 9 Field 2 - 8 Field 3 - 7 Field 4 - 6 Field 5 - 5 Field 6 - 0 Field 7 - 1 Any Idea? Thank for reply! Link to comment Share on other sites More sharing options...
comment Posted November 22, 2006 Share Posted November 22, 2006 If you divide 10,567.89 by 100, you'll get 105 (using the Div() function). Divide that by 10, and the remainder is 5 (use the Mod() function). Link to comment Share on other sites More sharing options...
Søren Dyhr Posted November 22, 2006 Share Posted November 22, 2006 Field 1 - 9 Field 2 - 8 Field 3 - 7 Field 4 - 6 Field 5 - 5 Field 6 - 0 Field 7 - 1 Since you can cut up a repeating field could this be written into a single repeating calc'field: Mod ( Div ( Round(Extend ( entry );2) ; 10^(Get (CalculationRepetitionNumber )-3) ) ; 10 ) --sd Link to comment Share on other sites More sharing options...
Questions King Posted November 27, 2006 Author Share Posted November 27, 2006 I will attach the sample file for more uderstanding, Thank you all for reply. Get_Separate_Amount.zip Link to comment Share on other sites More sharing options...
comment Posted November 27, 2006 Share Posted November 27, 2006 See the file I have posted here. Link to comment Share on other sites More sharing options...
Genx Posted November 27, 2006 Share Posted November 27, 2006 Pretty cool, thanks comment. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6359 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now