Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you are getting a #DIV/0! error from your VLOOKUP, then the error
is in the workbook where you are getting the data from, rather than in the VLOOKUP formula itself. Consequently, you should look at the "sending" workbooks and eradicate any errors that are in there. Hope this helps. Pete On Dec 23, 4:36*pm, ORLANDO VAZQUEZ wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Try this macro. Select the formula you want to change and run it. Try it in a test environment first Sub Sonic() For Each c In Selection If c.HasFormula Then F = Mid(c.Formula, 2) c.Formula = "=IF(ISERROR(" & F & "),""""," & F & ")" End If Next End Sub Mike "ORLANDO VAZQUEZ" wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You could use a find and replace to do this.
"ORLANDO VAZQUEZ" wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This worked perfectly.
Thank you so much Mike. "Mike H" wrote: Hi, Try this macro. Select the formula you want to change and run it. Try it in a test environment first Sub Sonic() For Each c In Selection If c.HasFormula Then F = Mid(c.Formula, 2) c.Formula = "=IF(ISERROR(" & F & "),""""," & F & ")" End If Next End Sub Mike "ORLANDO VAZQUEZ" wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Of course, but Mike gave the answer right to the point.
Thanks Pete. "Pete_UK" wrote: If you are getting a #DIV/0! error from your VLOOKUP, then the error is in the workbook where you are getting the data from, rather than in the VLOOKUP formula itself. Consequently, you should look at the "sending" workbooks and eradicate any errors that are in there. Hope this helps. Pete On Dec 23, 4:36 pm, ORLANDO VAZQUEZ wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando . |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Glad i could help and thanks for the feedback
"ORLANDO VAZQUEZ" wrote: This worked perfectly. Thank you so much Mike. "Mike H" wrote: Hi, Try this macro. Select the formula you want to change and run it. Try it in a test environment first Sub Sonic() For Each c In Selection If c.HasFormula Then F = Mid(c.Formula, 2) c.Formula = "=IF(ISERROR(" & F & "),""""," & F & ")" End If Next End Sub Mike "ORLANDO VAZQUEZ" wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Just for info.
Mike's macro does not check to see if ISERROR already exists in the formula(s) It won't matter to the result but it does make formulas a lot longer and look more complex if ISERROR gets doubled up. =IF(ISERROR(IF(ISERROR(A2&A3),"",A2&A3)),"",IF(ISE RROR(A2&A3),"",A2&A3)) I prefer to check as I go through the selected range. Sub ErrorTrapAdd() Dim myStr As String Dim cel As Range For Each cel In Selection If cel.HasFormula = True Then If Not cel.Formula Like "=IF(ISERROR*" Then myStr = Right(cel.Formula, Len(cel.Formula) - 1) cel.Value = "=IF(ISERROR(" & myStr & "),""""," & myStr & ")" End If End If Next End Sub Gord Dibben MS Excel MVP On Wed, 23 Dec 2009 09:50:01 -0800, ORLANDO VAZQUEZ <Orlando Vazquez wrote: This worked perfectly. Thank you so much Mike. "Mike H" wrote: Hi, Try this macro. Select the formula you want to change and run it. Try it in a test environment first Sub Sonic() For Each c In Selection If c.HasFormula Then F = Mid(c.Formula, 2) c.Formula = "=IF(ISERROR(" & F & "),""""," & F & ")" End If Next End Sub Mike "ORLANDO VAZQUEZ" wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Gord,
A good point, I never thought of that but for the formula I still prefer F = Mid(c.Formula, 2) instead of myStr = Right(cel.Formula, Len(cel.Formula) - 1) Mike "Gord Dibben" wrote: Just for info. Mike's macro does not check to see if ISERROR already exists in the formula(s) It won't matter to the result but it does make formulas a lot longer and look more complex if ISERROR gets doubled up. =IF(ISERROR(IF(ISERROR(A2&A3),"",A2&A3)),"",IF(ISE RROR(A2&A3),"",A2&A3)) I prefer to check as I go through the selected range. Sub ErrorTrapAdd() Dim myStr As String Dim cel As Range For Each cel In Selection If cel.HasFormula = True Then If Not cel.Formula Like "=IF(ISERROR*" Then myStr = Right(cel.Formula, Len(cel.Formula) - 1) cel.Value = "=IF(ISERROR(" & myStr & "),""""," & myStr & ")" End If End If Next End Sub Gord Dibben MS Excel MVP On Wed, 23 Dec 2009 09:50:01 -0800, ORLANDO VAZQUEZ <Orlando Vazquez wrote: This worked perfectly. Thank you so much Mike. "Mike H" wrote: Hi, Try this macro. Select the formula you want to change and run it. Try it in a test environment first Sub Sonic() For Each c In Selection If c.HasFormula Then F = Mid(c.Formula, 2) c.Formula = "=IF(ISERROR(" & F & "),""""," & F & ")" End If Next End Sub Mike "ORLANDO VAZQUEZ" wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando . |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Good idea Gord.
Thanks. "Gord Dibben" wrote: Just for info. Mike's macro does not check to see if ISERROR already exists in the formula(s) It won't matter to the result but it does make formulas a lot longer and look more complex if ISERROR gets doubled up. =IF(ISERROR(IF(ISERROR(A2&A3),"",A2&A3)),"",IF(ISE RROR(A2&A3),"",A2&A3)) I prefer to check as I go through the selected range. Sub ErrorTrapAdd() Dim myStr As String Dim cel As Range For Each cel In Selection If cel.HasFormula = True Then If Not cel.Formula Like "=IF(ISERROR*" Then myStr = Right(cel.Formula, Len(cel.Formula) - 1) cel.Value = "=IF(ISERROR(" & myStr & "),""""," & myStr & ")" End If End If Next End Sub Gord Dibben MS Excel MVP On Wed, 23 Dec 2009 09:50:01 -0800, ORLANDO VAZQUEZ <Orlando Vazquez wrote: This worked perfectly. Thank you so much Mike. "Mike H" wrote: Hi, Try this macro. Select the formula you want to change and run it. Try it in a test environment first Sub Sonic() For Each c In Selection If c.HasFormula Then F = Mid(c.Formula, 2) c.Formula = "=IF(ISERROR(" & F & "),""""," & F & ")" End If Next End Sub Mike "ORLANDO VAZQUEZ" wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando . |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Neater looking and shorter.
Gord On Wed, 23 Dec 2009 16:07:01 -0800, Mike H wrote: Gord, A good point, I never thought of that but for the formula I still prefer F = Mid(c.Formula, 2) instead of myStr = Right(cel.Formula, Len(cel.Formula) - 1) Mike "Gord Dibben" wrote: Just for info. Mike's macro does not check to see if ISERROR already exists in the formula(s) It won't matter to the result but it does make formulas a lot longer and look more complex if ISERROR gets doubled up. =IF(ISERROR(IF(ISERROR(A2&A3),"",A2&A3)),"",IF(ISE RROR(A2&A3),"",A2&A3)) I prefer to check as I go through the selected range. Sub ErrorTrapAdd() Dim myStr As String Dim cel As Range For Each cel In Selection If cel.HasFormula = True Then If Not cel.Formula Like "=IF(ISERROR*" Then myStr = Right(cel.Formula, Len(cel.Formula) - 1) cel.Value = "=IF(ISERROR(" & myStr & "),""""," & myStr & ")" End If End If Next End Sub Gord Dibben MS Excel MVP On Wed, 23 Dec 2009 09:50:01 -0800, ORLANDO VAZQUEZ <Orlando Vazquez wrote: This worked perfectly. Thank you so much Mike. "Mike H" wrote: Hi, Try this macro. Select the formula you want to change and run it. Try it in a test environment first Sub Sonic() For Each c In Selection If c.HasFormula Then F = Mid(c.Formula, 2) c.Formula = "=IF(ISERROR(" & F & "),""""," & F & ")" End If Next End Sub Mike "ORLANDO VAZQUEZ" wrote: Hi, I have several hundred different formulas on one spreadsheet like this one. =VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager name'!$BV$67:$CL$131,3,FALSE) The results sometimes return #DIV/0!, or other error messages which ruin my attempts at summing the results as well as the visual appeal. Is there a way to rewrite (en masse) these formulas to so that they first check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then an error result I will see a zero (0).? I can manually change them but that would take a day at least. Please let me know. Thank you, Orlando . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
=IF(ISERROR(SEARCH("insurance",A125,1)),"","*") | Excel Worksheet Functions | |||
Formula Result is "V6", need Excel to use cell "V6", not the resul | Excel Worksheet Functions | |||
TRYING TO COMBINE FORMULAS INTO AN "OR" FORMULA | Excel Discussion (Misc queries) | |||
embedding "ISERROR" function into an "IF" statement | Excel Worksheet Functions | |||
Syntax to "OR" 3 "ISERROR" conditions | Excel Worksheet Functions |