# SUMIF with 2 Criteria

#### razzandy

##### Active Member
Hi

Just cant get mi head round this, brain not working today!!

I want to sum lets say the the total in column C, if Column A matches a number and if Column B is above 0

Cheers

Ryan

I think I must need a SUMIF AND ???

### Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
razzandy said:
Hi

Just cant get mi head round this, brain not working today!!

I want to sum lets say the the total in column C, if Column A matches a number and if Column B is above 0

Cheers

Ryan

Try --

=SUMPRODUCT(--(A1:A1000=D1),--(B1:B1000>D2),C1:C1000)

Where D1 is your A column number criteria, D2 is your B column number [0] criteria and row 1000 is your end of data.

Thanks just_jon

I cant get that to work and anyway the data list is constantly growing.

This is my formula up to now which works fine:

=SUMIF(Orders!\$A:\$A,Data1!\$A\$1,Orders!\$R:\$R)

I need to add a 'AND' statement somewhere something like below:

=SUMIF(Orders!\$A:\$A,Data1!\$A\$1,AND(Orders!\$K:\$K>0),Orders!\$R:\$R)

Ryan

Ryan, Jon's formula works just fine for me. If you are adding more data than thru row 1000, just expand the range in the formula.
Book1
ABCDEFG
1111Col.A=6
2611Col.B>0
3601Result4
4441
5221
6611
7612
Sheet1

It is also possible to create dynamic [ ie, ever-growing/shrinking with your data ] range names, and use them in your formula.

Replies
3
Views
2K
Replies
3
Views
324
Replies
6
Views
990
Replies
1
Views
716
Replies
19
Views
752

1,203,522
Messages
6,055,893
Members
444,832
Latest member
Kauri

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