Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ::I am trying to detect cells that have the InconsistentFormula erro and if possible get each cell location. After our administrator runs a setup macro, I want to remind her t look at any cells that have formula errors.: -- DougVb ----------------------------------------------------------------------- DougVba's Profile: http://www.excelforum.com/member.php...fo&userid=3300 View this thread: http://www.excelforum.com/showthread.php?threadid=52833 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 30 Mar 2006 16:35:36 -0600, DougVba
wrote: ::I am trying to detect cells that have the InconsistentFormula error and if possible get each cell location. After our administrator runs a setup macro, I want to remind her to look at any cells that have formula errors.:: In a macro With ActiveSheet Range(Range("A1"), Range("A1").SpecialCells(xlCellTypeLastCell)).Spec ialCells(xlCellTypeFormulas, 16).Select End With Alternatively F5 (Goto), Special-- Formulas and select the Errors checkbox, deselecting the other three. HTH __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Richard, I attached the macro to a button for testing purposes. When I ran the macro I received a dialog box: Run-time error: '1004': No cells were found. I do have a formula error on the workbook -- DougVb ----------------------------------------------------------------------- DougVba's Profile: http://www.excelforum.com/member.php...fo&userid=3300 View this thread: http://www.excelforum.com/showthread.php?threadid=52833 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 30 Mar 2006 17:52:26 -0600, DougVba
wrote: Richard, I attached the macro to a button for testing purposes. When I ran the macro I received a dialog box: Run-time error: '1004': No cells were found. I do have a formula error on the workbook. Seems to work OK for me. Tested for #DIV/0!, #N/A, #VALUE! What is in the cell where the error is, and what does the cell return? Rgds __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The cell is returning the error: "The formula in this cell differs from the formulas in this area of th spreadsheet." I was trying to duplicate our timesheet spreadsheet which is returnin an "Inconsistent Formula" error, when adjacent Sum formulas differ i range by one cell. It looks like the code that you gave to me should have caught th "differs" error as well. Here is the code that I am using. Since I have not used thi cabability before maybe I messed up someplace: Sub FindIFerror() If Application.ErrorCheckingOptions.InconsistentFormu la Then With ActiveSheet Range(Range("A1") Range("A1").SpecialCells(xlCellTypeLastCell)).Spec ialCells(xlCellTypeFormulas 16).Select End With End If End Sub I am also wondering what exactly the "1004" error is telling me. I wa assuming that it did not find an "error", but perhaps the range setup i incorrect. Thanks for your help -- DougVb ----------------------------------------------------------------------- DougVba's Profile: http://www.excelforum.com/member.php...fo&userid=3300 View this thread: http://www.excelforum.com/showthread.php?threadid=52833 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Richard, just to add a little to the mix, I modified the code abov slightly to test your examples. "Result" is defined as a variant. With ActiveSheet Result = Range(Range("A1") Range("A1").SpecialCells(xlCellTypeLastCell)).Spec ialCells(xlCellTypeFormulas 16).Select If Result = True Then MsgBox ("NASA, we have a problem!") End If End With This works with a divide by zero error, but when I remove the divide b zero error, I return to the run time error -- DougVb ----------------------------------------------------------------------- DougVba's Profile: http://www.excelforum.com/member.php...fo&userid=3300 View this thread: http://www.excelforum.com/showthread.php?threadid=52833 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Detecting Row Deletion | Excel Programming | |||
Detecting Row Deletion | Excel Programming | |||
Detecting Excel 97 using VBA | Excel Programming | |||
Detecting if AutoFill was used? | Excel Programming | |||
Detecting merged cells | Excel Programming |