Help with executing the formula if the cell is not empty, if empty end.

kevinw

New Member
Joined
Jun 20, 2002
Messages
21
I am trying to do a formula that will run when the cell has a number in it, then do a calculation and stop if it does not.
So:
If Cell A1 has an amount of 100 and Cell B1 is empty then return a Blank cell
If Cell A! has an amount of 100 and Cell B! is 90 (or 101) then run a formula deducting A1 from B1 (understand the result can be positive or negative)
If Cell A! has an amount of 100 and Cell B1 is also 100 then return text of "Nil"

I've tried with if statements but can't quite get it right.

Thanks in advance
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
How about
Excel Formula:
=IF(B1="","",IF(B1=A1,"Nil",B1-A1))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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
Back
Top