Iferror and sumproduct together

chef

Well-known Member
Joined
Jul 10, 2002
Messages
610
Office Version
  1. 365
  2. 2016
I have this formula that works perfect 99% time with drop down combo but have occasions when some depts showing a #div/0! on some columns
Ive tried an iferror in from but cant get to work or its me with the syntax

Any suggestions would be appreciated
regards
Ian


=SUMPRODUCT(--(Data!$E$2:$E$20000=Summary!$A$1),--(Data!$G$2:$G$20000=Summary!$D15),--(Data!$A$2:$A$20000=Summary!F$6),Data!$J$2:$J$20000)/$E15
 

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
can you post some sample data with xl2bb add in, please?
 
Upvote 0
please fill in the light blue with representative sample of what data you are working with:

Book1
CDEFIJKL
1Data AData EData GData JE15summary A1Summary D1Summary F6
2
3
4
5
6
7
8
Sheet2
 
Upvote 0
I'm sorry, but my IT dept have blocked this facility and I cant use and tried before.
Ive posted a small screenshot if this helps
In this example Allied/Medical/Nursing/Other Ther should be zero for this dept but these have values for another dept in drop down.
Im just tried to get rod of Div if possible and hope this makes sense.

Many thanks


D E F G H I
HeadcountUnder 30Age 30-49Age 50-59Over 60
Operations Division
1654​
8.9%31.3%33.1%26.7%
Administrative Services
98​
10.2%​
36.7%​
34.7%​
18.4%​
Allied Health Profession
#DIV/0!​
#DIV/0!​
#DIV/0!​
#DIV/0!​
Healthcare Sciences
117​
Medical And Dental
#DIV/0!​
#DIV/0!​
#DIV/0!​
#DIV/0!​
Nursing/Midwifery
#DIV/0!​
#DIV/0!​
#DIV/0!​
#DIV/0!​
Other Therapeutic
Support Services
1439​
8.8%​
30.9%​
32.5%​
27.9%​
 
Upvote 0
Okay, so that is the report the formula is on.
can you copy and paste into a table the underlying columns in the Data Sheet and the Summary Sheets.
I don't see a cell identified here as E15 on the report sheet.
 
Upvote 0
my suggestion would be to do this:

Excel Formula:
=IF(E15 = 0, "", 
=SUMPRODUCT(--(Data!$E$2:$E$20000=Summary!$A$1),--(Data!$G$2:$G$20000=Summary!$D15),--(Data!$A$2:$A$20000=Summary!F$6),Data!$J$2:$J$20000)/$E15
)
 
Upvote 0
many thanks and I can try a work around with that
At the moment that shows a circular reference now but I will set up a helper table and reference that

many thanks for your time and help
regards
Ian
 
Upvote 0
I'mnot sure why that is creating a circular reference if it was not already. I did not add a new cell reference to the formula.
 
Upvote 0
I'mnot sure why that is creating a circular reference if it was not already. I did not add a new cell reference to the formula.
unless Data!E2:E2000 are on the same worksheet as the E15 you reference.

Note: It is strongly discouraged by most excel experts (I am not an expert but I listen to them) to ever use sheet names in cell references on the sheet with that name.
 
Upvote 0
ok thats helpful advise as I have been defaulting to these sheet names all time
appreciate your input and help.
have a great weekend
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,178
Members
449,071
Latest member
cdnMech

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