# Help with Max function in Averageifs formula

#### eta1322

##### New Member
Hi I have a averageif formula that I type in a high low criteria (example 1000 to 2000) and gives back the average

I need to be able to do the same function and give back the Max of the values but keep getting a #value back.

=IF(V7="","",AVERAGEIFS('Drill Data'!\$C\$6:\$C\$15000,'Drill Data'!\$A\$6:\$A\$15000,">="&\$U7,'Drill Data'!\$A\$6:\$A\$15000,"<=" &\$V7))

U=first input number
V=second input number
A=values U & V are looking up in
C=the value the average is pulling from

Thank you for any help

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### AhoyNC

##### Well-known Member
Check the values in column A. An #VALUE error indicates that one or more cells are not numeric, but text.

#### eta1322

##### New Member
there's no issue with that it's all numbers

also I am assume if it was that then I would get an error with my averageif formula which I don't

#### Joyner

##### Well-known Member
Until we have MAXIFS in Excel 2016...

Maybe something like array formula:

=MAX(IF(('Drill Data'!\$A\$6:\$A\$15000>=\$U7)*('Drill Data'!\$A\$6:\$A\$15000<=\$V7),'Drill Data'!\$C\$6:\$C\$15000))

CSE Formula - Entered with Cntl+Shift+Enter not just enter

#### eta1322

##### New Member
I tried something earlier and it didn't work, I think if forgot the "*" in there. Yours worked perfect thank you very much!

#### Joyner

##### Well-known Member
You are welcome

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,669
Messages
5,838,685
Members
430,563
Latest member
Raeyven

### 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.

### Which adblocker are you using?

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

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