Subtract cells but only if both have values

Turner93

New Member
Joined
Jun 23, 2012
Messages
3
I am writing a workbook and need to subtract one cell from another but only if both cells have values entered. I'm sure this is simple but I can't figure it out. Thanks in advance for your help.


John
 
Maybe this...

=IF(A1*B1,A1-B1,"")

Ok there is one problem I'm running into. This formula is also turning actual 0 difference as a blank.

let's say
A1=2% - B1=2% then I want C1=0% … C1 is displaying a blank when it should be 0%

I only want C1 to be blank if both A1 and B1 display as blank.

Currently there are some numbers and some blanks in column A and Column B…I would like column C to calculate the difference between A and B only if A and B both contain values.

The formula is kind of working but if the difference is 0% I need that to display.

I'm soooooooo close but so far! Help!
 
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,215,455
Messages
6,124,938
Members
449,197
Latest member
k_bs

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