![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Is it possible to average a set of values entered into one cell? How?
Any information is appreciated. |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Example: 5,3,3,,5
Reason: Working on summarizing survey information. The values above would be five separate responses to the same survey subquestion. The blank value indicates that the person who returned the fourth survey did not answer this survey subquestion. |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
I'm assuming that a "no response" would not be figured in the average?
However, if it is, what default/nuetral value is to placed? Tom |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,388
|
See if this array formula works for you.
Control+Shift+Enter: =AVERAGE((MID(SUBSTITUTE(A1,",",""),ROW(INDIRECT("1:"&LEN(SUBSTITUTE(A1,",","")))),1))+0) Assumes cell A1 contains the survey values, with them being single digits as portrayed in your question. Any help? _________________ Tom Urtis [ This Message was edited by: Tom Urtis on 2002-04-21 10:07 ] |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=SUBSTITUTE(A1,",","") In C1 enter either: =IF(LEN(B1),SUMPRODUCT(MID(B1,ROW(INDIRECT("1:"&LEN(B1))),1)+0)/(LEN(A1)-LEN(B1)+1),"") where no response is counted also as one. or =IF(LEN(B1),SUMPRODUCT(MID(B1,ROW(INDIRECT("1:"&LEN(B1))),1)+0)/LEN(B1),"") where only actual responses are taken into account. I'd strongly suggest to record each response in a cell of its own in order to avoid computations by means of performance-sensitive hefty formulas as the above. Aladin |
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Thanks for all the input. The last formula given by Aladin did the trick.
Thanks again. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|