Averageif and vlookup

jgedwardsv

New Member
Joined
Oct 27, 2016
Messages
31
Hi all!

I'm trying to pull averages and exclude any zeros from the calculation. What I have right now is:

=AVERAGE(VLOOKUP([@SeriesName],FundData[[#Headers],[#Data],[FullName]:[2000]],{4,5,6},FALSE))

Unfortunately this formula treats anything in that array that comes back that is blank as a zero. I have tried AVERAGEIF with the "<>0" criteria, however, excel keeps giving me an error. Is there something I am doing wrong or does excel averageif not work with a vlookup array?

Thanks for your help!

John
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I have - averageifs says too few criteria - I only want to average if there is something in the cell, not if it is blank or 0.

averageif gives me the error that I either need to remove quotes from "<>0" or add them if I don't put them in the formula.
 
Upvote 0
Either of the below work?

=AVERAGEIF([#Data],"<>"&0)

or

=AVERAGE(IF(ISBLANK([#DATA]),"",[#DATA]))

entered with ctrl+shift+enter
 
Upvote 0
the first option returns the same error.

The second puts a value error where there used to be zeros.

Is this an issue because of the vlookup returning null cells as 0's?
 
Upvote 0
are they indeed null or formatted 0's? is the format of the cells accounting?
 
Upvote 0
Yes, the cells are left blank. Everything is formatted as a % including the ones that are empty. Would that be the issue?

John
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

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