# Compound SUMIF

#### mckenny

##### New Member
I've got two columns but I only want to ge the grand total if the sum of column A is greater than 20 and if sum column C is greater than 25. What is the right formula?

The No Sum Section
A B
5 4
5 3
2 7
8 15

A B
4 5
3 2
18 17
12 11

Thanks for the help!

### Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi there,

Without seeing anything else, maybe ...

=IF((SUM(A:A)>20)*(SUM(C:C)>25),SUM(A:A,C:C),0)

Enter the following in the cell C1 (assuming the first data row for columns A & B are 1)

=IF(AND(A1>20,B1>25),SUM(A1:B1),"")

---

Oppsss, your original post indicated columns A & C were the data columns, but in the same post, you used columns A & B as data columns. My assumption is that data is in columns A & B. Column C will show a sum ONLY if values in rows of column A > 20 AND values in rows of column B > 25. Unlike the other posters, I also assume that you are considering each record (row) individually and not as a whole dataset.

Also, your illustration didn't have ANY qualifying records.

If I understand your question correctly:

To sum column A
=If(And(Sum(A1:A4>20,C1:C4>25),Sum(A1:A4))

To sum column C
=If(And(Sum(A1:A4>20,C1:C4>25),Sum(C1:C4))

Replies
0
Views
184
Replies
1
Views
207
Replies
3
Views
187
Replies
5
Views
178
Replies
11
Views
473

1,203,601
Messages
6,056,212
Members
444,850
Latest member
dancasta7

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