ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Smaller than 0 to return a 0 result (https://www.excelbanter.com/excel-worksheet-functions/256663-smaller-than-0-return-0-result.html)

MWRhino

Smaller than 0 to return a 0 result
 
Every tenant gets one free go per week. I need to create a formula where
where any negative numbers are returned as a '0' result.
('01'!C3+'02'!C3+'03'!C3+'04'!C3+'05'!C3+'06'!C3+' 07'!C3-1) Returns a -1
result. I need it to return '0' answer.

Duke Carey

Smaller than 0 to return a 0 result
 
Well - first let's fix the formula. This assumes your sheets '01' through
'07' are ALL side by side

Rewrite

('01'!C3+'02'!C3+'03'!C3+'04'!C3+'05'!C3+'06'!C3+' 07'!C3-1)

as

=SUM('01:07'!C3)-1

Now, to ensure it never goes negative, use

=MAX(SUM('01:07'!C3)-1,0)

"MWRhino" wrote:

Every tenant gets one free go per week. I need to create a formula where
where any negative numbers are returned as a '0' result.
('01'!C3+'02'!C3+'03'!C3+'04'!C3+'05'!C3+'06'!C3+' 07'!C3-1) Returns a -1
result. I need it to return '0' answer.



All times are GMT +1. The time now is 09:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com