2 Replies Latest reply on Sep 26, 2014 6:00 AM by DianeB123

# I have a total cell amount that can go up to any amount.  I also have a Grand total cell that uses the total cell amount BUT it needs to be a total number that is < = to 20

I have a TOTAL cell amount that can go up to any amount. I also have a GRAND total cell that uses the total cell amount BUT it needs to be a total number that is <= to 20.  So in other words. It the TOTAL = 31  the GRAND total can only = 20.   If the TOTAL = 8 the GRAND total would equal 8.

Thank you!

• ###### 1. Re: I have a total cell amount that can go up to any amount.  I also have a Grand total cell that uses the total cell amount BUT it needs to be a total number that is < = to 20

Custom calculation script for "GRAND total":

var total = +this.getField("TOTAL").value;

event.value = Math.min(total, 20);

• ###### 2. Re: I have a total cell amount that can go up to any amount.  I also have a Grand total cell that uses the total cell amount BUT it needs to be a total number that is < = to 20

You are awesome!!! Thank you so much!!