a1-b1 if greater than zero then show result otherwise don't

Hoopsah

Board Regular
Joined
Jul 27, 2007
Messages
71
Head scratcher for me I'm afraid

A1 - B1

If the answr is greater than zero then show the result, else show a zero

Any one got a clue about this?
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,169
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
=max(a1-b1,0)
 

tyija1995

Well-known Member
Joined
Feb 26, 2019
Messages
766
Office Version
  1. 365
Platform
  1. Windows
Hey Hoopsah,

Try using an IF formula,

IF(A1-B1<=0, 0, A1-B1)
 

Hoopsah

Board Regular
Joined
Jul 27, 2007
Messages
71
Thank you Alan and Tyija - both work like a charm :)

Just saved me from drawing blood I was scratching my head so hard :)

Thanks again
 

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,169
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
you're welcome
 

Watch MrExcel Video

Forum statistics

Threads
1,108,922
Messages
5,525,644
Members
409,658
Latest member
Yardcell

This Week's Hot Topics

Top