# Formula to ignore blank cells

#### Dairy

##### New Member
Hi I have a sheet setup to count and sum the values as below, second is an array formula.

=SUMPRODUCT(('Fert Input'!E\$12:E\$151=B8)*('Fert Input'!F\$12:F\$151='Fert Mix'!\$V\$4))+SUMPRODUCT(('Fert Input'!G\$12:G\$151=B8)*('Fert Input'!H\$12:H\$151='Fert Mix'!\$V\$4))

=SUM(IF('Fert Input'!E\$12:E\$151=B8,IF('Fert Input'!F\$12:F\$151=\$V\$4,'Fert Input'!C\$12:C\$151,0),0))+SUM(IF('Fert Input'!G\$12:G\$151=B8,IF('Fert Input'!H\$12:H\$151=\$V\$4,'Fert Input'!C\$12:C\$151,0),0))

These work well but I wish to add a 3rd and 4th formula to count and sum < or = to

=SUMPRODUCT(('Fert Input'!E\$12:E\$151=B8)*('Fert Input'!F\$12:F\$151<=\$N\$1))+SUMPRODUCT(('Fert Input'!G\$12:G\$151=B8)*('Fert Input'!H\$12:H\$151<=\$N\$1))

=SUM(IF('Fert Input'!E\$12:E\$151=B8,IF('Fert Input'!F\$12:F\$151<=\$N\$1,'Fert Input'!C\$12:C\$151,0),0))+SUM(IF('Fert Input'!G\$12:G\$151=B8,IF('Fert Input'!H\$12:H\$151<=\$N\$1,'Fert Input'!C\$12:C\$151,0),0))

How might I stop the formulas above counting blank cells it finds in columns F and H?

Last edited:

### Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

#### Robert Mika

##### MrExcel MVP
=SUMPRODUCT(ISNUMBER('Fert Input'!F\$12:F\$151)*('Fert Input'!E\$12:E\$151=B8)*('Fert Input'!F\$12:F\$151<=\$N\$1))+SUMPRODUCT(ISNUMBER('Fert Input'!H\$12:H\$151)*('Fert Input'!G\$12:G\$151=B8)*('Fert Input'!H\$12:H\$151<=\$N\$1))

#### Dairy

##### New Member
=SUMPRODUCT(ISNUMBER('Fert Input'!F\$12:F\$151)*('Fert Input'!E\$12:E\$151=B8)*('Fert Input'!F\$12:F\$151<=\$N\$1))+SUMPRODUCT(ISNUMBER('Fert Input'!H\$12:H\$151)*('Fert Input'!G\$12:G\$151=B8)*('Fert Input'!H\$12:H\$151<=\$N\$1))

Yes! works nicely. I can add the ISNUMBER as a third statement to the array formula.

=SUM(IF('Fert Input'!E\$12:E\$151=B8,IF('Fert Input'!F\$12:F\$151<=\$N\$1,IF(ISNUMBER('Fert Input'!F\$12:F\$151),'Fert Input'!C\$12:C\$151,0),0)))

Seems to work as well.

Cheers,

Daniel

Replies
5
Views
190
Replies
3
Views
194
Replies
5
Views
128
Replies
6
Views
255
Replies
12
Views
312

1,195,859
Messages
6,011,989
Members
441,661
Latest member
Pammie007

### 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.

### Which adblocker are you using?

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

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