Solved

#Num and #Value

Posted on 2011-02-21
7
359 Views
Last Modified: 2012-06-27
I have many formulas that say this after deleting a cell that the formula is "looking at".  I think there is a way to replace those with something else?  

say for instance, would rather it say "No" or maybe there is something more appropriate that an expert would know.

thank you
0
Comment
Question by:pdvsa
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 34947503
You can use IFERROR function in Excel 2007, e.g.

=IFERROR(your_formula,"No")

or in earlier versions

=IF(ISERROR(your_formula),"No","your_formula)

you can replace "No" with "" to make the formula return a blank

regards, barry
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34947520
pdvsa,

Try this sort of syntax:

=IF(ISERROR(Your formula here),"There's an error because a value used in the formula has just been deleted", ),Your formula here)

Patrick
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34947523
Xover I'm afraid...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 81

Expert Comment

by:byundt
ID: 34947672
If the formulas have already been entered and the cells deleted, then you can replace all the resulting error values with your desired text by using the following steps:

1) Select a range of cells containing error values you want to replace
2) F5, and then click the Special Cells button at bottom of resulting dialog
3) Choose the option for Formulas, then untick all the options except Errors
4) Click OK. This will select just the cells where error values are returned by formulas.
5) Click in the formula bar and enter the desired text
6) Hold the Control button down, then hit Enter


Brad
0
 

Author Comment

by:pdvsa
ID: 34948280
Hi Brad, 1 qstn, would i have to do this only once, save the file and then each time i encounter the error, it would be handled?

Thank you
0
 
LVL 81

Expert Comment

by:byundt
ID: 34948386
Yes. You would need to perform the manual procedure each time you want to clear the errors.

You can automate the process with a macro, however.
'This sub should be installed in a regular module sheet. Ideally, it would be called by a keyboard shortcut. You set those in the _
    Tools...Macros menu item in Excel 2003 (or Developer...Macros menu item in Excel 2007 orlater) by clicking the Options button. _
    In this workbook, I chose CTRL + Shift + E for the keyboard shortcut
Sub ClearErrors()
'Clears all cells containing formulas that return error values. Replaces those formulas with the text in variable sError.
Dim ar As Range, rg As Range
Dim sError As String
sError = "No"   'Text to display in error cells
Set rg = Selection.SpecialCells(xlCellTypeFormulas, xlErrors)
If Not rg Is Nothing Then
    If rg.Cells.Count < 16084 Then
        rg.Value = sError
    Else
        For Each ar In rg.Areas
            ar.Value = sError
        Next
    End If
End If

End Sub

Open in new window

To run macro:
1) Select range of cells to be purged of error values
2) ALT + F8 to open macro selector. Choose the ClearErrors macro and hit Run button. If a keyboard shortcut has been set up (CTRL + Shift + E in this workbook) you may use that instead to launch the macro.

To install the macro:
1) ALT + F11 to open the VBA Editor
2) Use the Insert...Module menu item to create a blank module sheet.
3) Paste the code ther
4) ALT + F11 to return to the worksheet interface
5) Remember to save the file as .xls or .xlsm file extension. If you save it as .xlsx (the default), then the macro will be removed as part of the save.

Note: You may need to change macro security to Medium (Excel 2003 or earlier) or to "Disable all macros with notification" (Excel  2007 or later). You will then need to enable macros each time you open the workbook.

You do this in the Tools...Macros...Security menu item (Excel 2003) or Office icon ...Options...Trust Center...Trust Center Settings...Macro Settings menu item (Excel 2007). In Excel 2010, you use the File menu, then follow the same path as for Excel 2007.

Brad
ClearErrorsQ26837545.xlsm
0
 

Author Comment

by:pdvsa
ID: 34948532
Very nice... Appreciate your thoughtfulness knowing very well that the question has been awarded pts.   I thank you for taking the time...  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now