# AVERAGEIF Function

## AVERAGEIF (Arithmetic Mean) – Single Criteria IF statement

Use the AVERAGEIF Function to find the arithmetic mean in Excel while defining a specific criteria.  In this example, we will be using the AVERAGEIF function. In this case, we will only be finding the average of a data set if it meets a certain criteria. You can only identify one criteria using the AVERAGEIF.

Various AVERAGE Syntax’s available in Excel:

=AVERAGE – returns an average of numbers.

=AVERAGEIF – finds an average of numbers based on a single criterion.

=AVERAGEIFS – finds an average of numbers based on multiple criteria.

### AVERAGEIF FunctionSyntax:

` =AVERAGEIF(range, criteria, [average_range]) `

I will explain the syntax above. We start by selecting the range of Data, B3 through C10. Next, we identify the criteria, “Bob.”  It is important to note that you must use parenthesis. Finally, we select the range of data we would like to average. This gives us the result of 14.33

` =AVERAGEIF(B3:C10,"Bob",C3:C10)  `

### VBA ColorIndex

Colors Colors could be very important and useful in excel application. There are two ways in which you can get