I am trying to do a calc like =IF(BH2>0, Z2/BH2, 1). But if BH2 shows "Bad" because the data in BH2 was not found, then the calc shows as #VALUE!

I'd like to have the calc show as 1 in this case. How can I do this?

Amit -

I can't say I am getting the same error you are; however, any time you want to avoid a #VALUE or any other #-error from messing up your calculation, use the IFERROR() function as a sleeve:

Which means, if this function returns an error just use this (1).

Hope this helps - Andrea
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Andrea Lynch


I am very familiar with teaching excel concepts, and formulas. I am not as capable with VBA questions.


I currently tutor in this area. I worked for four years developing curriculum and teaching Microsoft applications to adult audiences. I also previously volunteered for allexperts.com.

BA, English, Western Washington University Certificates in C Programming, ASP.NET, VisualBasic.NET, University of Washington Extension

Awards and Honors
Rated in the top ten instructors (national), New Horizons Computer Learning Center.

©2017 About.com. All rights reserved.