problem with conditional format

davegreen100

New Member
Joined
Jun 10, 2011
Messages
2
hello

i have the following formula in a cell in sheet1, i want it to look from A3:A11 in sheet2 and for any row which matches the value in sheet1!A2, sum the values from sheet2!D3:D11. If there is no match then return 0.

but even with the correct data in sheet2, 0 is always returned

=SUM(IF(Sheet2!A3:A11=Sheet1!A2,Sheet2!D3:D11,0))

any ideas what i'm doing wrong?

dave
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I may be wrong, but I think the result of the IF statement would give you an error, not a range. You need a SUMIF

Try this:
=SUMIF(Sheet2!A3:A11,Sheet1!A2,Sheet2!D3:D11)
 
Upvote 0
Why not use the SUMIF function?

=SUMIF(Sheet2!A3:A11, Sheet2!A2, Sheet2!D3:D11)
 
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,225
Members
452,896
Latest member
IGT

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