![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 34
|
I'm trying to figure out a formula where if the number that is generated is negative a "0" is populated in that cell. An example is
a1= 10 a2=5 =sum (a2-a1) is -5. How can I make this so that a "0" shows up? Thanks! |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: May 2002
Posts: 13,278
|
Welcom to the board!
Use if: =if(sum(a2-a1)<0,0,sum(a2-a1)) Paddy |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
=MAX(A2-A1,0)
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|