freecolours Posted August 4, 2004 Posted August 4, 2004 It's late and I still need to do a lot of dev work..... and my brain starts leaving me... who can relay to that sometimes.... I can't figure out this calculation.... I have two global number fields, say _gnr1 = 3500 and _gnr2 = 3450. Now I need to know how much percentage _gnr2 is from _gnr1. I use this in a progress function, so I loop the _gnr2 down to 1. This means that I need to start with 1% and end with 100%. Who can help me out?
freecolours Posted August 4, 2004 Author Posted August 4, 2004 Ray, you're just to good to be true! But now the counter goes from 99% down to 1%, and I would like to have it the other way around.... ehhh, any suggestions?
CobaltSky Posted August 4, 2004 Posted August 4, 2004 OK, gotcha. Int((_gnr1 - _gnr2) / _gnr1 * 100) or 100 - Int(_gnr2 / _gnr1 * 100) Either will do...
freecolours Posted August 4, 2004 Author Posted August 4, 2004 YES, YES, YES!! Very nice! I'll gonna use this a lot, so I'm thrilled to get every bit out of this calculation! Thanks a lot again, Ray! Time for me now to...
Recommended Posts
This topic is 7485 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