SUMPRODUCT excluding blank cells

mmac723

New Member
Joined
Jun 18, 2019
Messages
12
I'm trying to count how many agents hit goal in a particular quarter.
I've set up the following formula to see if the number in column B is greater than that in column H, subtracting if LOA is entered.
My problem is it's counting blank spaces, totally throwing off my calculations, and I can't seem to get it to stop!

=(SUMPRODUCT(--(B3:B15>=H3:H15))+SUMPRODUCT(--(B17:B29>=H17:H29)) +SUMPRODUCT(--(B31:B43>=H31:H43)))-SUMPRODUCT(--(B3:B43="LOA"))-SUMPRODUCT(--(B3:B43="Pending"))


HELP!!

thank you, mmac
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try this

=(SUMPRODUCT(--((B3:B15<>"")*(B3:B15>=H3:H15)))+SUMPRODUCT(--((B17:B29<>"")*(B17:B29>=H17:H29))) +SUMPRODUCT(--((B31:B43<>"")*(B31:B43>=H31:H43))))-SUMPRODUCT(--(B3:B43="LOA"))-SUMPRODUCT(--(B3:B43="Pending"))
 
Upvote 0
Unfortunately that came back with the value "-319". I added spaces between the " " and came back with the value 1202.
The answer for the particular set I'm working with should be 5.

Any ideas what's going on??
 
Upvote 0
You could copy the excel data with which you are testing and paste it here, to review them.
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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