Formula Help

SDowse

Board Regular
Joined
Sep 23, 2009
Messages
120
Hi,

I am trying to do a formula that will sum a column of data based on 2 criteria in another column.

So, E173:E234 contains either "Permanent", "Temporary" or "Perm Risk", and I want to sum range O173:O234 only where "Permanent" or "Perm Risk" appear in column E...

I've tried a few things, but can't get it to work properly...any ideas?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Assuming nothing else in that column starting with Perm

=SUMIF(E173:E234,"Perm*",O173:O234)
 
Upvote 0
Qucik Sample....
Excel Workbook
ABCDEF
1My TextMy NumbersProof28<<<<
2abc11
3ddd2
4ccc33
5ccc44
6abc55
7ddd6
8abc77
9ccc88
10ddd9
114528
Sheet1
Excel 2007
Cell Formulas
RangeFormula
E1=SUMPRODUCT(SUMIF(A2:A10,{"abc","ccc"},C2:C10))
 
Upvote 0
Another alternative, if you had other entries starting with "P" or "Perm" that you didn't want included.

=SUM(SUMIF(E173:E234,{"Perm Risk","Permanent"},O173:O234))
 
Upvote 0
Another alternative, if you had other entries starting with "P" or "Perm" that you didn't want included.

=SUM(SUMIF(E173:E234,{"Perm Risk","Permanent"},O173:O234))

Can use 1 function instead of 2 :

=SUMPRODUCT((E173:E234={"Permanent","Perm Risk"})*O173:O234)

Regards
 
Upvote 0
Can use 1 function instead of 2 :

=SUMPRODUCT((E173:E234={"Permanent","Perm Risk"})*O173:O234)

Regards

Proably not drastic in with the small range in use here, but in large volumes of data, that version would cause a significant increase in calculation times.
 
Upvote 0
Proably not drastic in with the small range in use here, but in large volumes of data, that version would cause a significant increase in calculation times.

If consider performance, I think SUMIF+SUMIF will faster than SUM+SUMIF+{array constant}

=SUMIF(E173:E234,"Perm Risk",O173:O234)+SUMIF(E173:E234,"Permanent",O173:O234)

Regards
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top