Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

#Num and #Value

Posted on 2011-02-21
7
Medium Priority
?
366 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

715 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