Skip to main content
Participant
March 8, 2024
Answered

Average of text boxes with values

  • March 8, 2024
  • 1 reply
  • 1342 views

Hi,

I'm trying to write a custom calculation script for a text box that calculates the average value of the numbers entered into several other text boxes, but also omits from the denominator any text boxes that don't have a value.  For simplicity sake, I named the text boxes that will contain the numbers going into the average calculation A1, A2, etc. through A11.  So for example if 9 of the text boxes have values, it would be the sum of values divided by 9 instead of 11.  I looked at a couple of code examples on this board and couldn't get them to work correctly.  Could anyone show me how to calculate this average?

 

Thank you.

This topic has been closed for replies.
Correct answer try67

Search the forum for calcAverage. It's a function I wrote a while ago that does just that.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 8, 2024

Search the forum for calcAverage. It's a function I wrote a while ago that does just that.

Participant
March 8, 2024

Thank you!  I found it and I'm good to go!  Appreciate the help.

Peter