Using SUMIF to divide 2 cells

Dirkelton

New Member
Joined
Feb 16, 2011
Messages
7
Can anyone help. I'm trying I'm trying to divide 2 columns by each other if another column equals X

For example if column A equals 10, then divide the total of Column B agaisnt the total of column C.

I've tried extending the SUMIF formula in a number of ways (example below) but had no joy.

=sumif(A2:A10,="10",(sum(B2:B10))/(sum(c2:c10)))

:confused:
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Dirkelton

New Member
Joined
Feb 16, 2011
Messages
7
So simple, I tried numerous other combos but that. Reckon I need to go home.

Thanks Barry
 

energman58

Well-known Member
Joined
Oct 25, 2010
Messages
553
=SUMPRODUCT(--(U4:U8=10),(V4:V8))*SUMPRODUCT(--(U4:U8=10),(W4:W8))

Sums the total values in column V and in column W for those rows where column U = 10 and then multiplies them together. Is this what you were trying to do?

Alternatively

=SUMPRODUCT(--(U4:U8=10),(V4:V8)^-1,(W4:W8))

Divides each value in W by the corresponding value in V and adds those up where U = 10

Couldnt understand what you are driving at:confused: but I guess it must be one of these two
 

Watch MrExcel Video

Forum statistics

Threads
1,123,514
Messages
5,602,091
Members
414,501
Latest member
mdhaumyu

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
Top