Can someone help me convert this into Fast Key? I want to be able to use the input macro and only enter the sale price, mortgage price, and auto-populate the sentence. Also is there a way to auto add a comma on numbers once it exceeds 999? For example, "1000" becomes "1,000".
Excel
Formula
Thanks!
Convert an Excel Formula into FastKey?
Try using "Insert command code" macro, as shown in my other post.
For example, the command code could be
In such case use No output prefix "_" before the variable names ("_Price") to instruct FastKeys not to output the value.
For example, the command code could be
Code: Select all
Send, % ThousandsSep(INPUT__Price * INPUT__Volume)
ThousandsSep(x, s=",") {
return RegExReplace(x, "\G\d+?(?=(\d{3})+(?:\D|$))", "$0" s)
}
return
That's not working and I am struggling to get this to work. Can you show me using the formula above? That would be most helpful.
The command (Type: Send) would look like this:
%INPUT__SalePrice%%INPUT__MortgagePrice%%CODE_Output%
Note the "_" prefix in front of the variable names (no output).
Use "Insert Command Code" macro with the following code:
%INPUT__SalePrice%%INPUT__MortgagePrice%%CODE_Output%
Note the "_" prefix in front of the variable names (no output).
Use "Insert Command Code" macro with the following code:
Code: Select all
DownPayment := INPUT__SalePrice - INPUT__MortgagePrice
DownPercent := Round((DownPayment/INPUT__SalePrice)*100, 0)
DownPaymentFormat := Thousands(DownPayment)
Send, % "The buyer placed a down payment of $" DownPaymentFormat " (" DownPercent "%) and financed the remaining balance."
Thousands(x, s=",") {
return RegExReplace(x, "\G\d+?(?=(\d{3})+(?:\D|$))", "$0" s)
}
return