VBAFormula IFERROR SUMPRODUCT SUM IF error problem

DeezNuts

Board Regular
Joined
Aug 12, 2014
Messages
177
I am trying to add this line in to thiswroksheets vba and getting my butt kicked.

Code:
IFERROR(SUMPRODUCT(A201:E201,A231:E231)/SUM(IF(A231:E231<>""-"",A201:E201)),""-"")

I am trying like this

Code:
Range("E232").Value = Evaluate("{=IFERROR(SUMPRODUCT(A201:E201,A231:E231)/SUM(IF(A231:E231<>""-"",A201:E201)),""-"")}")

I have tried with and without {} and still get a VALUE error. The "-" are place holders on the sheet. Anyone able to shed any light on how to fix this?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try:
Code:
Range("E232")..FormulaArray = "=IFERROR(SUMPRODUCT(R[200]C:R[200]C[4],R[230]C:R[230]C[4])/SUM(IF(R[230]C:R[230]C[4]<>""""-"""",R[200]C:R[200]C[4])),""""-"""")"
 
Upvote 0
Thank you for trying Danerida that still returns a VALUE error. Also noticed that version is installing the formula in the cell which is what I am avoiding. Will look into this more tomorrow need some sleep.
 
Upvote 0
My bad... Try:
Code:
Range("E232").Value = Evaluate(Range("E232").FormulaArray = "=IFERROR(SUMPRODUCT(R[200]C:R[200]C[4],R[230]C:R[230]C[4])/SUM(IF(R[230]C:R[230]C[4]<>""""-"""",R[200]C:R[200]C[4])),""""-"""")")
 
Upvote 0
This is being a pain in the butt. It is returning False now even though there are values Here is what I have to make it fit with my setup
Code:
Range("E232").Value = Evaluate(Range("E232").FormulaArray = "=IFERROR(SUMPRODUCT(R[-31]C[-4]:R[-31]C[0],R[-1]C[-4]:R[-1]C[0])/SUM(IF(R[-1]C[-4]:R[-1]C[0]<>""-"",R[-31]C[-4]:R[-31]C[0])),""-"")")

I am lost on this one
 
Upvote 0

Forum statistics

Threads
1,214,801
Messages
6,121,644
Members
449,045
Latest member
Marcus05

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