K
kapiszon
Hi there,
I have 7 columns and out of them I have to calculate its Average Value.
These columns have values from 1-5, they represent answers in a
questionnaire, 1 for very bad, 5 for very good. It's easy, with a simple
Select SQL query I can add all these fields and then divide by 7 and I get a
result.
But there is a tricky part as well. Sometimes there can be a value 0, which
means that someone didn't provide any answer for that question, and therefore
in calculating the Average we cannot use this 0 value, we have to omit it.
There can be a few 0 answers in those 7 fields, we don't know how many.
How to do it? What sort of VBA code might help to sort it out? Any ideas?
I have 7 columns and out of them I have to calculate its Average Value.
These columns have values from 1-5, they represent answers in a
questionnaire, 1 for very bad, 5 for very good. It's easy, with a simple
Select SQL query I can add all these fields and then divide by 7 and I get a
result.
But there is a tricky part as well. Sometimes there can be a value 0, which
means that someone didn't provide any answer for that question, and therefore
in calculating the Average we cannot use this 0 value, we have to omit it.
There can be a few 0 answers in those 7 fields, we don't know how many.
How to do it? What sort of VBA code might help to sort it out? Any ideas?