Sumproduct with blanks or rows with numbers

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,368
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
How can I modify this formula to not return value due to the cells with the number? Rows 8 and row 9 are causing the error.

Book1
ABCD
1Header
2131 All (xx) AT H131 All (xx) AT H#VALUE!
3131 All (xx) HH D
4131 All (xx) AT H
5131 All (xx) DD
6131 All (xx) AT H
7131 All (xx) LM
81
91
10159 All (jj)
11159 All (jj)
12159 All (jj)
13159 All (jj)
14159 All (jj)
15159 All (jj)
16159 All (jj)
17159 All (jj)
18131 All (xx) LM
Sheet1 (4)
Cell Formulas
RangeFormula
D2D2=SUMPRODUCT(--(LEFT(A2:A18,FIND(")",A2:A18))=LEFT(C2,FIND(")",C2))))
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Excel Formula:
=IF(NOT(ISNUMBER($A2)),SUMPRODUCT(--(LEFT(A2:A18,FIND(")",A2:A18))=LEFT(C2,FIND(")",C2)))))
 
Upvote 0
Does throwing in an error checker work? (I assume the expected answer is 7 in your example?)
Excel Formula:
=SUMPRODUCT(--(IFERROR(LEFT(A2:A18,FIND(")",A2:A18)),"")=LEFT(C2,FIND(")",C2))))
 
Upvote 0
Neither one of these works for me. With the first one I get #VALUE! and the second answer returns 1
 
Upvote 0
Excel Formula:
=IFERROR(SUMPRODUCT(--(LEFT(A2:A18,FIND(")",A2:A18))=LEFT(C2,FIND(")",C2)))),"")
 
Upvote 0
This doesn't seem to be working either. Wrapping the Sumproduct in an IFERROR does not seem to be evaluating the #VALUE! error that the non-text (or blank) cells or throwing within the formula.

How do I correct for this

=SUMPRODUCT(--({TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;#VALUE!;#VALUE!;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;TRUE}))
 
Upvote 0
Try:
Book2
ABCD
1Header
2131 All (xx) AT H131 All (xx) AT H7
3131 All (xx) HH D
4131 All (xx) AT H
5131 All (xx) DD
6131 All (xx) AT H
7131 All (xx) LM
81
91
10159 All (jj)
11159 All (jj)
12159 All (jj)
13159 All (jj)
14159 All (jj)
15159 All (jj)
16159 All (jj)
17159 All (jj)
18131 All (xx) LM
Sheet2
Cell Formulas
RangeFormula
D2D2=SUMPRODUCT(--(IFERROR(LEFT(A2:A18,FIND(")",A2:A18))=LEFT(C2,FIND(")",C2)),0)))
 
Upvote 0
Is it just a simple count you're after?
clean.xlsm
ABCD
1Header
2131 All (xx) AT H131 All (xx) AT H7
3131 All (xx) HH D
4131 All (xx) AT H
5131 All (xx) DD
6131 All (xx) AT H
7131 All (xx) LM
81
91
10159 All (jj)
11159 All (jj)
12159 All (jj)
13159 All (jj)
14159 All (jj)
15159 All (jj)
16159 All (jj)
17159 All (jj)
18131 All (xx) LM
Sheet3
Cell Formulas
RangeFormula
D2D2=COUNTIF(A2:A18,LEFT(C2,9)&"*")
 
Upvote 0
Yes Kevin, that would for sure work if the left was always going to be 9. Unfortunately, that won't always be the case, that is why I need to find the first close parenthesis.

AhoyNC, that just returns a 1
 
Upvote 0
How about
Excel Formula:
=SUMPRODUCT(--(IFERROR(LEFT(A2:A18,FIND(")",A2:A18)),0)=LEFT(C2,FIND(")",C2))))
or
Excel Formula:
=COUNTIFS(A2:A18,LEFT(C2,FIND(")",C2))&"*")
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,629
Members
452,933
Latest member
patv

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