1

The Google Sheets formula below successfully adds referenced values from 14 different sheets:

=SUM(
   Sunday1B!M175,'Sunday 1D'!M175,
   Saturday1B!M175,'Saturday 1D'!M175,
   MondayL1!M175, Monday1!M175,
   TuesdayL1!M175, Tuesday1!M175,
   WednesdayL1!M175, Wednesday1!M175,
   FridayL1!M175, Friday1!M175, 
   ThursdayL2!M175, Thursday2!M175) 

The formula will add both positive and negative numbers, but I only want positive numbers added.

How would I modify my formula so that the referenced values are only added if they are positive?

1 Answer 1

1

The SUMIF function enables you to specify a condition that must be met for the referenced values to be added.

Since you only want to sum positive numbers, the condition in this case is ">0".

Your references are combined in an array in the formula by enclosing them in braces {}.

=SUMIF(
   { Sunday1B!M175, 'Sunday 1D'!M175,
     Saturday1B!M175,'Saturday 1D'!M175,
     MondayL1!M175, Monday1!M175,
     TuesdayL1!M175, Tuesday1!M175,
     WednesdayL1!M175, Wednesday1!M175,
     FridayL1!M175, Friday1!M175, 
     ThursdayL2!M175, Thursday2!M175 },
   ">0") 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.