Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detecting cells that have InconsistentFormula error


::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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 296
Default Detecting cells that have InconsistentFormula error

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detecting cells that have InconsistentFormula error


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 296
Default Detecting cells that have InconsistentFormula error

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detecting cells that have InconsistentFormula error


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detecting cells that have InconsistentFormula error


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detecting Row Deletion Doug Glancy Excel Programming 0 July 6th 04 06:56 PM
Detecting Row Deletion GaryZ Excel Programming 0 July 6th 04 06:33 PM
Detecting Excel 97 using VBA Casper Hornstrup[_2_] Excel Programming 4 June 24th 04 04:28 AM
Detecting if AutoFill was used? Gilroy Excel Programming 2 June 16th 04 08:35 PM
Detecting merged cells microsoft[_5_] Excel Programming 3 June 15th 04 10:06 PM


All times are GMT +1. The time now is 09:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"