sumifs with Countif to exclude zero

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,561
Office Version
  1. 2021
Platform
  1. Windows
I have the following below that if the sumifs formula returns zero, then a zero must be returned, otherwise use the countifs formula


However, if the sumifs returns for eg 0.00000000183 or -0.0000000164, then the countifs value will result


I would like to amend my formula to exclude all zeroes which has a value after the decimal point as per example above


code]=IF(SUMIFS('Vat%'!B:B,'Vat%'!G:G,'Vat Payable per Vat %'!A5)=0,0,COUNTIFS('Vat%'!G:G,'Vat Payable per Vat %'!A5,'Vat%'!B:B,"<>0")) [/code]



your assistance is most appreciated
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Tricky without the data but this might work:

Code:
=IF(ABS(SUMIFS('Vat%'!B:B,'Vat%'!G:G,'Vat Payable per Vat %'!A5))<0.1,0,COUNTIFS('Vat%'!G:G,'Vat Payable per Vat %'!A5,'Vat%'!B:B,"<>0"))

WBD
 
Upvote 0
Thanks for the help. Formula works perfectly
 
Upvote 0

Forum statistics

Threads
1,214,865
Messages
6,121,988
Members
449,060
Latest member
mtsheetz

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