Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

#Num and #Value

Posted on 2011-02-21
7
Medium Priority
?
368 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 2000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

916 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