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