Div Error Formula Gross Margin

Pacman52

Active Member
Joined
Jan 29, 2009
Messages
404
Office Version
  1. 365
Platform
  1. Windows
Hi all, could someone let me know how to stop the #DIV/0 error from showing in the gross margin cell if there are blank references in either one of 2 cells.

For example I have
Excel Formula:
 =(A1-B1)/A1
to show the gross margin percentage

but if either A1 or B1 doesn't have anything in the cell or is a 0 then how do I use IfError to check both cells or would I be better of using a different method to check for an error?

many thanks Paul.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You could use:

Excel Formula:
=IFERROR((A1-B1)/A1,0)

for example.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,701
Messages
6,173,916
Members
452,538
Latest member
ralphtaylor466

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