Can I sumif/Iferror positive and negative numbers?

PWil84

New Member
Joined
May 20, 2021
Messages
41
Office Version
  1. 2019
I'm currently using the formula below
=IFERROR(SUMIF(E:F,H7,F:F),"NOT AVAILABLE")
to sum data in columns, but I have a negative number in that data set and I need it to populate in my sheet as well. Any tips?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Would you post a sample of your data and what you expect as a result using XL2BB?
 
Upvote 0
What is the criteria or value found in H7?

=SUMIF(The range you're testing for a certain criteria, the specified criteria, The range with numbers to sum if the specified criteria was met)

IF you only wanted to include only the positive values, you could do the following:

=SUMIF(E:F,">=0",F:F)

Otherwise, it should automatically include all negative values too.

If you're specifying a positive value in H7 and want to include the negative version of that value in your criteria, you could also try something like this:

=IFERROR((SUMIF(E:F,H7,F:F)+SUMIF(E:F,H7*-1,F:F)),"NOT AVAILABLE")
 
Last edited:
Upvote 0
Would you post a sample of your data and what you expect as a result using XL2BB?
1623356419434.png
 
Upvote 0
What is the criteria or value found in H7?

=SUMIF(The range you're testing for a certain criteria, the specified criteria, The range with numbers to sum if the specified criteria was met)

IF you only wanted to include only the positive values, you could do the following:

=SUMIF(E:F,">=0",F:F)

Otherwise, it should automatically include all negative values too.

If you're specifying a positive value in H7 and want to include the negative version of that value in your criteria, you could also try something like this:

=IFERROR((SUMIF(E:F,H7,F:F)+SUMIF(E:F,H7*-1,F:F)),"NOT AVAILABLE")
It's Fringes (Text Criteria) could that be the issue?
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,218
Members
448,554
Latest member
Gleisner2

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