Sumproduct problem with blanks / text

plant007

Board Regular
Joined
Jun 2, 2011
Messages
55
Office Version
  1. 2019
Platform
  1. Windows
Hello

I am working on a table where I am using sumproduct but do not want to count blank cells or cells with text in (column G) I have used the following equations;

Code:
=IF(OR(ISBLANK($G$3:$G$15),ISTEXT($G$3:$G$15)),,SUMPRODUCT(--($G$3:$G$15<=$D$3:$D$15)))
which returns 9

and

Code:
=IF(ISNUMBER($G$3:$G$15),SUMPRODUCT(--($G$3:$G$15<=$D$3:$D$15)--($G$3:$G$15<>"")))
which returns FALSE

The answer should be 5 as there are 5 examples where the date in column G is the same or less than the corresponding date in column D

Any help would be most appreciated
Thanks
Any
 

Excel Facts

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

I am working on a table where I am using sumproduct but do not want to count blank cells or cells with text in (column G) I have used the following equations;

Code:
=IF(OR(ISBLANK($G$3:$G$15),ISTEXT($G$3:$G$15)),,SUMPRODUCT(--($G$3:$G$15<=$D$3:$D$15)))
which returns 9

and

Code:
=IF(ISNUMBER($G$3:$G$15),SUMPRODUCT(--($G$3:$G$15<=$D$3:$D$15)--($G$3:$G$15<>"")))
which returns FALSE

The answer should be 5 as there are 5 examples where the date in column G is the same or less than the corresponding date in column D

Any help would be most appreciated
Thanks
Any
Control+shift+enter, not just enter:

=SUM(IF(ISNUMBER($G$3:$G$15),IF($G$3:$G$15<=$D$3:$D$15,1)))
 
Upvote 0
You're almost there..

Try

=SUMPRODUCT(--($G$3:$G$15<=$D$3:$D$15),--($G$3:$G$15<>""))
 
Upvote 0
Thanks to both of you for your kind assistance and I can now use your help to build upon in my work

Jonmo1 - I get an answer of 6 with your formula as I think it is picking up examples where text is te same in both columns (in this case "N/A")
 
Upvote 0
Thanks to both of you for your kind assistance and I can now use your help to build upon in my work

Jonmo1 - I get an answer of 6 with your formula as I think it is picking up examples where text is te same in both columns (in this case "N/A")

You are welcome. Thanks for providing us feedback. IsNumber is a better test for the existence of numbers.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

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