Solved

#Num and #Value

Posted on 2011-02-21
7
358 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 80

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 80

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
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 …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

757 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

23 Experts available now in Live!

Get 1:1 Help Now