Late night SumProduct problems

NewOrderFac33

Well-known Member
Joined
Sep 26, 2011
Messages
1,275
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
Good evening,

I'm having a problem with the following SumProduct formula
Code:
=SUMPRODUCT(--(Col_DB_Prefix=F5),--(Col_DB_P="Y"),--(Col_DB_Category="Foreign Private"))
This formula returns 1, yet there are absolutely no records in my database that match these criteria.

There are lots of similarly structured formulae in the workbook that are returning erroneous values too.
The Col_DB_ range names are created by a routing that I have used in countless other applications and are all the same size and shape.

Can anyone suggest anything that might be wrong with the formula or suggest, from past experience, any worksheet issues that might lead to my SumProduct formulae returning incorrect totals?

Thanks in advance

Pete
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi.

Very difficult to say without seeing the actual sheet.

Though since Excel is convinced that there is one row which matches all three criteria, it may be worth interrogating it as to which row that is. At least then you can manually go to that line and investigate.

This array formula** should do that:

=MIN(IF(Col_DB_Prefix=F5,IF(Col_DB_P="Y",IF(Col_DB_Category="Foreign Private",ROW(Col_DB_Category)))))

Late night indeed!

Cheers


**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
 
Upvote 0
Probably also worth checking you don't have circular references and, of course, that calculation is set to automatic. ;)
 
Upvote 0
Do you get the same result with =COUNTIFS(Col_DB_Prefix,F5,Col_DB_P,"Y",Col_DB_Category,"Foreign Private")
 
Upvote 0
Thanks all for your suggestions. As I'm soft and it's gone midnight, I'm now tucked up in bed, but will investigate all your suggestions tomorrow. I do recall that it all worked OK with SUMIFS previously. Perhaps I went a bit sumproduct happy and need to revert to SUMIFS.

Thanks

Pete
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,485
Members
448,967
Latest member
visheshkotha

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