Skip to playerSkip to main content
Learn how to calculate average with if condition in Excel.

To calculate an average with an if condition in Excel, you use the AVERAGEIF function, which allows you to average all values that meet specific criteria. For example, the formula =AVERAGEIF(D5:D16,TRUE,C5:C16) calculates the average of values in the range C5:C16 where the corresponding cells in the range D5:D16 are TRUE. If you need to average with multiple criteria, you use the AVERAGEIFS function, which works similarly but allows for multiple conditions. The AVERAGEIF function helps average cells with a condition by specifying the range to check for the condition, the criteria, and the range to average. You can reference a cell for criteria in the AVERAGEIF function by using a cell reference instead of a fixed value, such as =AVERAGEIF(D5:D16,A1,C5:C16), where A1 contains the condition. To average only if a cell has a value, you simply ensure your criteria check for non-blank cells, such as using "" in your condition range.

How do you calculate average with if condition in Excel?
How to average if with multiple criteria?
How do you average all values that meet criteria in Excel?
Excel AVERAGEIF function to average cells with condition
What is the average if function in Excel criteria cell reference?
How do you average only if a cell has a value in Excel?

Here are the steps outlining my video.

Add Checkboxes
1) Select the area to add checkboxes
2) Insert ~ Checkbox


Calculate Average with If Condition
=AVERAGEIF(D5:D16,TRUE,C5:C16)


Calculate Average with If Condition With Error Check
=IFERROR(AVERAGEIF(D5:D16,TRUE,C5:C16),0)


How to average if with multiple criteria?,How do you average all values that meet criteria in Excel?,Excel AVERAGEIF function to average cells with condition,What is the average if function in Excel criteria cell reference?,How do you average only if a cell has a value in Excel?,

Check out my complete suite of Microsoft Excel Tips and Tricks.
https://www.youtube.com/@jjnet247/shorts
https://www.tiktok.com/@exceltips247
https://www.instagram.com/exceltips247/
https://www.dailymotion.com/ExcelTips247
https://www.pinterest.com/ExcelTips247/excel-tips-and-tricks/
https://x.com/ExcelTips247/media
https://www.reddit.com/r/Excel247/
https://www.facebook.com/XyberneticsInc/reels/

#microsoft #excel #tips #tipsandtricks #microsoftexcel #accounting #fyp #fypシ #exceltips #exceltricks

Category

📚
Learning
Transcript
00:00Can you calculate average revenue based on whatever selection you made in column D's checkbox like this?
00:05Here's how you can do it.
00:07Let's start by introducing a couple of checkbox on this particular column D itself.
00:12You're going to select the cells on column D like this.
00:15Go to insert and then checkbox.
00:17That will introduce all the checkbox for you.
00:19Now to calculate the average, basically you're going to say equal average if open parenthesis.
00:27The first argument would be the range for the condition.
00:30This is going to be my range for the condition.
00:32And in this range, I'm looking for a true value, which means that the checkbox is check.
00:37And then the second or rather the third argument would be the range for the average calculation,
00:44which is going to be my revenue column.
00:46Close parenthesis and hit enter.
00:48But when you do that, you can see you get division by zero, mainly because none of my checkbox are
00:53selected.
00:53Now to mitigate that and make it a bit more hardy, what you can do is that you can encapsulate
00:59the average if with if error function like this.
01:03And if it's an error, the second argument for if error would be zero.
01:06As in, if there's an error, I'm going to show a value of zero instead of division by zero.
01:11When you hit enter, you can see it shows a value of zero because none of the checkbox has been
01:15selected.
01:16Now if you go ahead and select the checkbox, you can see that the average calculation is done for any
01:21of this row that has a checkbox next to it.

Recommended