Excel Formula

trying to get the average number ignoring all negative value, data and is in one workbook and the info should be in another.
LVL 2
Jorge OcampoAsked:
Who is Participating?
 
Ryan ChongCommented:
try use AVERAGEIF or AVERAGEIFS functions:

example:
=AVERAGEIF(D2:D12,">0",D2:D12)

Open in new window

try change the range accordingly.

more info:

How to calculate average in Excel - formula examples of AVERAGE, AVERAGEIF, AVERAGEIFS
https://www.ablebits.com/office-addins-blog/2015/08/28/excel-average-averageif/
0
 
Rgonzo1971Commented:
Hi,

since the question does not exclude 0s

then try
=AVERAGEIF(D2:D12,">=0",D2:D12)

Open in new window

Regards
0
 
Jorge OcampoAuthor Commented:
that part i got but what about getting the info from a different sheet for example data is in sheet1 but i am trying to display data in sheet2?
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
Rgonzo1971Commented:
then try in sheet2

=AVERAGEIF(Sheet1!D2:D12,">=0",Sheet1!D2:D12)
0
 
Jorge OcampoAuthor Commented:
so it avoids any negative numbers?
0
 
Jorge OcampoAuthor Commented:
i had to do this ">0" since this ">=0 gave me wrong information
0
 
Rgonzo1971Commented:
Your choice
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.