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:
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
=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
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,178
Members
448,871
Latest member
hengshankouniuniu

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