Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add numbers ignore text

Status
Not open for further replies.

Zorro1265

Technical User
Nov 14, 2000
181
US
I have a form where numeric values are selected from combo boxes. The values 0-4 may be chosen and an alpah character of "X" if none of the numerics are valid. I need to take these values add them up and average them. I want to ignore the fields containing "X" and also not use a field containing "X" in my average euquation (so if out of 16 fields I have 2 with "X" I only divide the sum by 14). Any ideas on how this may be accomplished? Zorro
 
add 3 textboxes
set text1 to
=val(combo1)+val(combo2)+val(combo3).......for each combo

set text2 to
==IIf(IsNumeric([combo1]),1,0)+IIf(IsNumeric([combo2]),1,0)+
=IIf(IsNumeric([combo3]),1,0)+IIf(IsNumeric([combo4]),1,0)...for each combo

text3 = text1/text2


Whew
 
a few extra = signs in that post but I'm sure you get the Idea
 
Thanks!! That got me going where I need to. Zorro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top