ReeGiGi

New Member
Joined
Dec 11, 2013
Messages
2
Hello
I am one f those people that can normally solve an excel problem with a search. Unfortunately, I can't find what I am looking for this time. Please help :eek:)

Here is my problem, I need to be able to create an average total that skips any missing information. For example, if I have four values I need the average for all four (e.g. 5+6+7+3/4), but if one is missing I need the average of three (e.g. 5+7+3/3).

I found the array formula: =AVERAGE(IF($A$1:$A$5<>0,$A$1:$A$5)) [Note: I pressed Ctrl+Shift+Enter to make it an array formula]. Which works perfectly for cells that are next to each other (e.g. A4:W4). The trouble I am having though is that the cells I need to pull the data from are not next to each other e.g. (K4, N4, S4, W4).

I did try to ammend the array formula with the following: =AVERAGE(IF($K$4,$N$4,$S$4,$W$4<>0,$K$4,$N$4,$S$4,$W$4)). But of course that came back with a "too many arguments" error.

How can I ammend this information to make this formula work.

Extra information if needed: The cells that have missing data are not blank or have a 0 value, they show a "#N/A" (which doesn't need fixing).
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hello

Here is one way:

Firstly used a MATCH formula with column & look for column K, N, S & W. Which is 11, 14, 19 & 23 respectively. Then divided the range, If zeros, errors or texts are in the range will give error, using ISNUMBER will pick up only TRUE conditions.

Array Formula:

=AVERAGE(IF(ISNUMBER(MATCH(COLUMN(K4:W4),{11,14,19,23},0)/(K4:W4)),K4:W4))
 
Upvote 0
Try this

19
20
9
2
15
20
14.17Average
=AVERAGEIF(A1:A8,"<>""",A1:A8)Formula

<colgroup><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
With two criteria:

19
20
9
2
0
15
20
14.17Average
=AVERAGEIFS(A1:A8,A1:A8,"<>""",A1:A8,"<>0")Formula

<colgroup><col><col></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,360
Messages
6,124,492
Members
449,166
Latest member
hokjock

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top