Newbies cj Posted October 15, 2001 Newbies Posted October 15, 2001 Ok, I'm sure this is simple, but I am having a hard time coming up with the proper calculation to add feet & inches. Any help would be great.
LiveOak Posted October 15, 2001 Posted October 15, 2001 Assume fields: Feet1 (number) Inches1(number) Feet2 (number) Inches2 (number) FeetTotal (calculation, number) = Feet1 + Feet2 + Int((Inches1 + Inches2)/12) InchesTotal (calculation, number) = Mod(Inches1 + Inches2, 12) -bd
Newbies cj Posted October 16, 2001 Author Newbies Posted October 16, 2001 To be more specific, I host our local Punt, Pass & Kick in our town and when the scores are measured, they are given as 9.7 for 9 feet 7 inches, so I need to add the three different measurements. Example: 9.7 + 12.8 + 18.3 = 40.6. Regular addition gives you 40.8. Can one of those still work?
Vaughan Posted October 16, 2001 Posted October 16, 2001 You're going to have to do some fancy text manipulations to work out what part of the string is feet and which part is inches. as long as the value is *always* entered as feet.inches it'll be OK, but I have a feeling that 3 feet might be eneterd as just plain old "3" but that can be worked around. I'll assume the value is entered into the field called "distance" which needs to be a text field, not a number field First check to see if a decimal point has been typed... if not, the the value is feet. Then use the Position() function to locate the position of the decimal point: everything to the left if feet and to the right is inches, add them appropriately. If the text calculation seems difficult, it sure is. I just spent fifteen minutes trying to type it in for you and got about 25% of the way through. It might be easier to get them to convert to metric. <evil grin>
Newbies cj Posted October 17, 2001 Author Newbies Posted October 17, 2001 You were right Vaughan, it took quite a bit of time a manipulating but I finally got it to work. It's not pretty, but it works. Thanks for the suggestions.http://www.fmforums.com/ubb/images/icons/smile.gif
Recommended Posts
This topic is 8509 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