How to Average Negative and Positive Numbers in Excel

We have created a column in Excel with positive and negative numbers like Water Height from the Average Depth of a River in the range C4:C11. We have a Date column in range B4:B11 and a Flooding Condition column in range D4:D11 related to the water height of that particular river.

Sample Data: How to AVERAGE Negative and Positive Numbers in Excel


Method 1 – Use the AVERAGE Function to Average Negative and Positive Numbers

Steps:

  • The Average Change in Water Height is found by using the following formula.
=AVERAGE(C5:C13)
  • Range C5:C13 has positive and negative numbers.
  • The AVERAGE function will add the positive and negative numbers and divide them by the available numbers of water height data in this case the number is 9.
=AVERAGE(ABS(C5:C13))
  • Range C5:C13 has positive and negative numbers.
  • ABS (C5:C13) returns {2;13;22;5;25;1.7;1;11;3} which means ABS turns all negative values into positive values.
  • These positive values {2;13;22;5;25;1.7;1;11;3} are the input of the AVERAGE function that will add the numbers and divide them by the number of water height data points.

Using AVERAGE function to average negative and positive numbers in Excel

Read More: How to Average Filtered Data in Excel


Method 2 – Using the AVERAGE and IF Functions

Steps:

  • We need the water height data when the Flooding Condition is Normal. We will use the following formula in Excel:
=AVERAGE(IF(D5:D13="Normal",ABS(C5:C13)))
  • Range C5:C13 has positive and negative numbers.
  • IF (D5:D13=”Normal”, then return ABS (C5:C13)) which will be {2; FALSE; FALSE;5; FALSE;1.7;1; FALSE;3}.
  • The AVERAGE function will add the numbers and divide them by the available numbers of water height data points.

Applying AVERAGE and IF Function

  • We need the water height data when the Flooding Condition is flooded and the corresponding water height is also greater than 20. We will use the following formula in Excel.
=AVERAGE(IF(D5:D13="Flood",IF(C5:C13>20,C5:C13)))
  • Range C5:C13 has positive and negative numbers.
  • IF (C5:C13>20, C5:C13) which will be {FALSE; FALSE;22; FALSE;25; FALSE; FALSE; FALSE; FALSE}.
  • IF (D5:D13=”Flood”, IF (C5:C13>20, C5:C13)) will be the input of the AVERAGE function which will look like the following formula: =AVERAGE ({FALSE; FALSE;22; FALSE;25; FALSE; FALSE; FALSE; FALSE}).
  • The AVERAGE function will add the numbers and divide them the applicable number of data points.

Applying AVERAGE and IF Function for conditional averaging data


We used the statistical function called AVERAGE function in Excel which returns the average value of data with the combination of the IF function. Excel has a built-in function that can do the same job more easily and spontaneously.

Alternative Steps:

  • We need the water height data when the Flooding Condition is flooded and the corresponding water height is also greater than 20. Apply the following formula.
=AVERAGEIF(C5:C13,">-3")
AVERAGEIF(range, criteria, [average_range])
range = C5:C13
criteria = “>-3”
  • The AVERAGEIF function will add the numbers and divide them by the available numbers of water height data.

Applying AVERAGEIF Function

Read More: How to Calculate Average of Text in Excel


Download the Practice Workbook


Related Articles


<< Go Back to Calculate Average in Excel | How to Calculate in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Al Ikram Amit
Al Ikram Amit

Al Ikram Amit, holding a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, serves as a key Excel & VBA Content Developer at ExcelDemy. Driven by a profound passion for research and innovation, he actively immerses himself in Excel. In his role, Amit not only skillfully addresses complex challenges but also exhibits enthusiasm and expertise in gracefully navigating tough situations, emphasizing his steadfast commitment to consistently delivering exceptional, high-quality content that adds significant... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo