Formula question

nyrfan

Board Regular
Joined
Feb 6, 2006
Messages
130
I have the following formula in a cell:

=IF(OR(L7=0,$L$2=0),"",SUM(D7-L7))


It works fine BUT what I'd like to emilminate is negative numbers. So if the number being generated is < or = 0 I want the cell to be left blank.

Is there a way do do that?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

nyrfan

Board Regular
Joined
Feb 6, 2006
Messages
130
The only thing is when the cells are empty I an now getting the word "#value" in the calculating cell. Is there a way to get rid of this?
 
Last edited:
Upvote 0

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,124
sorry...incorrect formula added originally - revision below


=IF(OR(ISNUMBER(D7)=FALSE,ISNUMBER(E7)=FALSE),"",IF(OR(L7=0,$L$2=0,D7-L7<=0),"",SUM(D7-L7)))
 
Upvote 0

Forum statistics

Threads
1,191,322
Messages
5,985,976
Members
439,994
Latest member
lalkelalke04

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top