SUMPRODUCT to ignore text

plotting

New Member
Joined
Jun 13, 2016
Messages
21
Looked through other posts about this and cannot make isnumber work with sumproduct

=SUMPRODUCT(--(A:A>B:B))

[TABLE="width: 500"]
<tbody>[TR]
[TD]User 1[/TD]
[TD]User 2[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]9[/TD]
[/TR]
</tbody>[/TABLE]

I'd expect to get 3 as the answer but since it's counting the text it gives me 4, any help would be greatly appreciated
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Plotting,

simply:
Code:
[COLOR=#333333]=SUMPRODUCT(--(A2:A4>B2:B4))[/COLOR]
 
Upvote 0
Eh I guess I should have explained more, sometimes in cells A593 and B593 for example there will be text that's why I think I need ISNUMBER
 
Upvote 0
Maybe:

Code:
[TABLE="width: 582"]
<colgroup><col width="582"></colgroup><tbody>[TR]
   [TD="width: 582"]=SUMPRODUCT(--(A:A>B:B),--(ISNUMBER(A:A)),--(ISNUMBER(B:B)))[/TD]
 [/TR]
</tbody>[/TABLE]
 
Upvote 0
This worked perfectly and I figured out my error so double thanks!

Maybe:

Code:
[TABLE="width: 582"]
<tbody>[TR]
[TD="width: 582"]=SUMPRODUCT(--(A:A>B:B),--(ISNUMBER(A:A)),--(ISNUMBER(B:B)))[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Whilst the formula works & is shorter to write, I'd highly recommend shortening the range. For example =SUMPRODUCT(--(A1:A1000>B1:B1000),--(ISNUMBER(A1:A1000)),--(ISNUMBER(B1:B1000)))
calculates nearly 100 times faster on my machine (because it doesn't have to process all 1,000,000+ rows, most of which are likely empty)
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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