Sumproduct Formula Problem

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,595
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
=SUMPRODUCT(--(R13:R91<>"0"),--(S13:S91="D*"))

Something not right withmy formula.
I am trying to get a calculated value when the cell value in column R is not equal to 0 (<> 0) AND the cell value in column S begins with a "D". ("D*")

I am getting #VALUE as a result.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Thank you friend,

=SUMPRODUCT(--(R13:R91<>0),--(LEFT(P13:P91,1)="D"))

Gives me #NA. I was expecting 3. (I made an incorrect range reference in my first example ... should have been column P, not S)
 
Last edited:
Upvote 0
As a matter of fact ... yes.
I take it that's bad?
 
Upvote 0
Yes, that is bad. Presumably those cells contain formulas like VLOOKUP that are returning #N/A. You could adjust those formulas like this

=IF(ISNA(your formula),"",your formula)

to return blanks rather than #N/A.
 
Upvote 0
Wonderful! Yes ... that worked.
Thank you VoG...
 
Upvote 0
As a matter of fact ... yes.
I take it that's bad?
Sometimes you may want to keep the errors for whatever reason.

It can probably still be done with the errors present.

Post back if you want to pursue this and tell us which column has the errors in it. Also, what type of data is in the column when the formulas do not return #N/A. Is it text? Numbers? Could be either?
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,901
Members
452,948
Latest member
Dupuhini

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