SumProduct but avoinding sum 2 times the same wrong cell

drom

Well-known Member
Joined
Mar 20, 2005
Messages
528
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and Thanks in advance

I have a Column in a table

I am trying to sum how many of the cells in this table column are wrong, by Wrong Imean:
  • The Cell Value is Empy
  • The cell Value is <=1
  • The Cell Value>=25
  • The Cell Value is Text
rcA = range("A4:A500")

So I was trying to use in A2 the following Formula:

A2 =SUMPRODUCT(--((rcA="")+(rcA<=0))+(rcA>24)+(ISTEXT(rcA)))

But Since I can put Text in any cell of this range, eg: A4 = "Hello" this formula add 2 wrong possibilities for the same cell
  • So A2 formula is Wrong
If any cell in rcA can be Empty, eg A4="", I get 2 wrong possibilities for the same cell , so once again this formula is wrong

Any Help ?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
How about
Excel Formula:
=SUMPRODUCT(--(((rcA="")+(rcA<=0)+(rcA>24)+(ISTEXT(rcA)))>0))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

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