Sumif

AJDionne

New Member
Joined
Apr 22, 2002
Messages
1
I have been trying to figure out a formula to
compare column A to a cell and compare column B to another cell then SUM the value column C
ex:
A B C
DATE Operation tph
SAT 046-00 8.6
SUN 046-00 0
WED 047-00 7.6
THU 047-00 9.8
SAT 331-00 44.5

I tried
=SUM(IF($A$2:$A$2049=$G2,IF($B$2:$B$2049=$F4,1,0),0)) but this return the count, I need SUM of column C not a count .
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
On 2002-04-23 17:26, AJDionne wrote:
I have been trying to figure out a formula to
compare column A to a cell and compare column B to another cell then SUM the value column C
ex:
A B C
DATE Operation tph
SAT 046-00 8.6
SUN 046-00 0
WED 047-00 7.6
THU 047-00 9.8
SAT 331-00 44.5

I tried
=SUM(IF($A$2:$A$2049=$G2,IF($B$2:$B$2049=$F4,1,0),0)) but this return the count, I need SUM of column C not a count .

Hi AJDionne:
You can use the DSUM function:

=DSUM(A1:C6,"tph",D1:E2) ..... giving the result 7.6

where the first argument is data_range A1:C6, second argument is tph (the field to be summed, and the third argument is the criteria range with DATE in cell D1, Operation in cell E1, WED in cell D2, and 047-00 in cell E2./

HTH

Please post back if it works for you otherwise explain a little further and let us take it from there!



_________________
Yogi Anand

Edit: Deleted inactive website from hardcoded signature
This message was edited by Yogi Anand on 2003-01-19 14:02
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,981
Members
448,538
Latest member
alex78

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