Drop-down list and Average function

D

dustinhurley

I have a repeating table with two columns. Column One has a drop-down
list for the user to select from items 1, 2, or 3. Column Two is a
text box for the user to enter a dollar amount.

I want to average the dollar amounts associated with items 1,2, and 3
from the drop down list. I have a section for the average dollar
amount for item 1, the average dollar amount for item 2, and the
average dollar amount for item 3.

I do not know how to calculate the averages. I need to somehow
associate the text box containing the dollar amount to whichever item
the user selects from the drop down list.

Is the current() function the solution? Can you help?
 
D

dustinhurley

I almost have a solution. I've added a text box for each selection in
the drop-down box. I put conditional formatting on the text boxes
that will hide the text box unless its corresponding item is selected
from the drop down list.

But, now I have a new problem. If I select item 1, the text box for
item one appears. So, all is good. If I change my selection to item
2, the text box for item 2 appears. Again, all good. But, when I
make that change, any data that I entered into the text box for item
one remains in the form after I change the selection. The box is
hidden, but the data is still present and it affects my average
formula.

Is there a way I can clear the data in a control once it is hidden?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top