Forum Discussion
Andrew58
Nov 06, 2023Copper Contributor
Help with a Conditional Formula
I have written an Excel Spreadsheet that calculates a currency value in various cells based around the tax scales as income increases. The result of the sheet (total tax payable) requires the addition of several cells to give a total currency value, however I need to ignore (or not include) cells values that are negative.
I'm asking here if anyone can please tell me how to 'instruct' or 'format' a cell, so that if the result of the calculation in a cell is a negative currency values - then show the value as $0 (zero), so that the negative value is not included in the 'total tax payable' sum calculation.
I hope I explained that OK ??
Andrew58 One simple method would be to use the MAX function to return the maximum value between the calculation and zero. For example:
=MAX(calculation, 0) =MAX(A1-B2, 0) =MAX(8-10, 0) =MAX(-2, 0) =0
- Andrew58Copper ContributorHi Vinod2406, that's brilliant. I mucked around trying something like that but you obviously need to know the exact structure/make up of the statement.
Thanks for your help !
- djclementsBronze Contributor
Andrew58 One simple method would be to use the MAX function to return the maximum value between the calculation and zero. For example:
=MAX(calculation, 0) =MAX(A1-B2, 0) =MAX(8-10, 0) =MAX(-2, 0) =0
- Andrew58Copper ContributorThanks dj, that worked & helped me a lot !