Ignoring blank cells using Average & Vlookup formulas.

erinbe

New Member
Joined
Sep 27, 2011
Messages
21
Hi, hope someone can help...

I have multiple sheet (April, May, June, July...etc) and want to average values on each of the sheets.

Ex:

Sheet: April

Joe 10 54
John 15 64
Sarah 25 18

All sheets are the same. I've been using the average formula and vlookups to find the corresponding number on each sheet.

But some sheets have blank cells (giving #value errors) and I want to ignore these cells, not change them to 0's which would affect the overall average. I don't want to ignore 0's either because there are valid 0's on these sheets.

I've looked everywhere and am newer to the advanced formulas in excel. Hopefully someone can help me out here.

Thank You!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Are you averaging just one column on each or 2? In your sample data there are 2 columns of numbers, do they both get averaged?
 
Upvote 0
I'm taking one cell (based on the vlookup) from each sheet and average those values in another sheet (Agent Summary). Is that what you're asking?
 
Upvote 0
So your formula currently looks something like the following (as seen on "agent Summary" tab)

=Average(April!A1,May!A1,JuneA1)

Is that correct?
 
Upvote 0
=Average(April!A1,May!A1,JuneA1)

Yes, but they are averages of vlookups...

Ex:

=AVERAGE(VLOOKUP($A4,'April 2011'!$A$3:$P$141,6,FALSE),VLOOKUP($A4,'May 2011'!$A$3:$P$141,6,FALSE),VLOOKUP($A4,'June 2011'!$A$3:$P$141,6,FALSE),VLOOKUP($A4,'July 2011'!$A$3:$P$141,6,FALSE),VLOOKUP($A4,'August 2011'!$A$3:$P$141,6,FALSE))
 
Upvote 0
Hmm, that is tricky. I've heard something about AVERAGEIFS in Excel 2007 but haven't used it, that might help. Other wise you might have to a do a really long formula where you sum the values on all 12 tabs and divide by the count of non-blank values on each tab.

EDIT:

i tried this ugly formula and got the desired result:

Code:
=SUM(VLOOKUP("Jan",$F$5:$G$8,2,0),VLOOKUP("Feb",$F$5:$G$8,2,0),VLOOKUP("Mar",$F$5:$G$8,2,0),VLOOKUP("Apr",$F$5:$G$8,2,0))/SUM(IF(ISBLANK(VLOOKUP("Jan",$F$5:$G$8,2,0)),0,1),IF(ISBLANK(VLOOKUP("Feb",$F$5:$G$8,2,0)),0,1),IF(ISBLANK(VLOOKUP("Mar",$F$5:$G$8,2,0)),0,1),IF(ISBLANK(VLOOKUP("Apr",$F$5:$G$8,2,0)),0,1))
 
Last edited:
Upvote 0
That might be tough because there will be a couple thousands of this formula in a sheet...might take a while to compute. How would I write that kind of formula?

Any other ideas?
 
Upvote 0
That might be tough because there will be a couple thousands of this formula in a sheet...might take a while to compute. How would I write that kind of formula?

Any other ideas?
Yeah, that's gonna be tough!

What version of Excel are you using?
 
Upvote 0
Excel 2002

....1012 formulas to be exact...guess a couple thousand was a bit over exaggerated.
 
Upvote 0
Excel 2002

....1012 formulas to be exact...guess a couple thousand was a bit over exaggerated.
That's still a bunch!

Try something like this monster:

=SUMPRODUCT(SUMIF(INDIRECT("'"&{"april","may","june","july"}&" 2011'!A3:A10"),A4,INDIRECT("'"&{"april","may","june","july"}&" 2011'!F3:F10")))/SUMPRODUCT(COUNTIF(INDIRECT("'"&{"april","may","june","july"}&" 2011'!A3:A10"),A4))

How many months do you need to calculate, all 12? Jan thru Dec?
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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