@Alan-Kilborn said in Percentage Calculator:
Can this be tied to a shortcut keycombo?
Not really, since it’s a dialog-based function; but the dialog is non-modal, so you can leave it open while working. I suppose it would be possible to use the dialog accelerator keys while the dialog retains focus, but that would be more clumsy than just using the mouse, I think.
The PythonScript solution you suggested is probably superior if you want to manually select instances to convert rather than do a batch, either by column or by regular expression.
Can the number of decimal digits be controlled?
Yes. That’s described in the help for Formulas. The short version is that you enter it like this:
(?=format:formula)
where the format gives the minimum number of integer digits, and if decimals are wanted, a decimal point and the number of decimal places to be shown. Specifics are given in the help, but as examples, you could use:
(?=6:reg(1)*.9)
if you wanted leading zeros to make a minimum of six digits, and no decimals; or:
(?=2.3:reg(1)*.9)
if you wanted always at least two digits to the left of the decimal point and exactly three digits to the right; or:
(?=0.-4:reg(1)*.9)
if you wanted up to four digits after the decimal point but with trailing zeros suppressed, no decimal point if there are no non-zero digits after the decimal point, and no zero before the decimal point when the integer portion is zero and the decimal portion is not zero.
The default when using just (?=formula) is (?=1.-6:formula), meaning up to six decimals, suppress trailing zeros, suppress decimal separator if nothing follows, no leading zeros except that at least one digit is required before the decimal point, even if it is a zero.