# SUMIF Function

#### BCS2

##### Board Regular
Can multiple criteria be used with this function? I am using this function to find an average time based on the criteria being greater than a certain number and less than or equal to another cetain number.

Is there another function available to accomplish this?

### Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

#### gaftalik

##### Well-known Member
Hi ,

try average(if(and(logicalone;logical2);your range)) entered as an array with Ctrl, shift and enter

G.Luck

#### BCS2

##### Board Regular

gaftalik,

Here is the formula you suggested.

=AVERAGE(IF(AND(K:K>&A59;K:K<=&A60);K:K))

It tells me that there is an error in my formula. I tried entering as an array, no luck. Column K contains times in [H]:MM format. I am trying to sum all the times within a range of time (two criteria), and then find the average.

#### gaftalik

##### Well-known Member
Oops, sorry it is not the formula you need , now i understood better.

#### fairwinds

##### MrExcel MVP

Enter formula with Ctrl + Shift + Enter
Book1
ABCD
1CriteriaTime
211
322
433
5443.5
655
766
877
Sheet5

#### BCS2

##### Board Regular
fairwinds:

This is the formula that you suggested.

{=AVERAGE(IF((K3:K62>\$A59)*(K3:K62<=\$A60),K3:K62))}

It seems to work so far. However, the amount of data that is entered into this sheet each week varies greatly. Instead of specifying a data range (K3:K62) I would like to include the entire K column. That way, when the data amount varies I won't have to change the formula every week.

Possible?

ray:

#### fairwinds

##### MrExcel MVP
The formula don't like the whole column i.e. A:A but you can specify a range as large as you like as AVERAGE disregards text and empty cells.

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,167,816
Messages
5,855,795
Members
431,764
Latest member
scottishbigyin

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