Staying within the 100% (1 Viewer)

Czeszyn

Registered User.
Local time
Today, 12:17
Joined
Oct 14, 2014
Messages
128
I am stumped. When I worked on a formula first in excel:
IFERROR(Min(100%-(H8/G8)),0) This did first gave a 0 if there was not number, but the main part that I want to use in my access database is the part that it uses the min so that the percentage will not go over 100%.

I have the following in my access:
[TotalAmount]/[EffectiveCapacity] this formula works, but I want it to go over 100%.

Other wise for the total month, I get numbers like 350%.

Is there away to make it only go up to 100%?

Thank you.
Tony
 

CJ_London

Super Moderator
Staff member
Local time
Today, 20:17
Joined
Feb 19, 2013
Messages
16,674
there is no equivalent to the excel min function in Access. Instead you need to write a UDF (a public function in a standard (not form) module)

Code:
public function cMin(val1 as double, val2 as double) as double

    if val1<val2 then cmin=val1 else cmin=val2

end function
 

Czeszyn

Registered User.
Local time
Today, 12:17
Joined
Oct 14, 2014
Messages
128
Hi CJ_London
Thank you for responding. Would I do that right in the form, then the property?
 

Users who are viewing this thread

Top Bottom