custom function with condition in google sheet

The solution for “custom function with condition in google sheet” can be found here. The following code will assist you in solving the problem.

//custom function with Condition
* Calculte sales button
* @customFunction
function salesBonus(salesAmount){
return salesAmount*.25;
} else if(salesAmount>=10000){
return salesAmount*.15;
} else{
return 0;

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in