Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inexplicable VBA errors in formulas
I use Excel 2002 under XP Pro SP2.
Perhaps there are some memory limits, in particular to do with named expression/ranges -- which I use extensively -- that could be causing unexplained corruption in my formulas when I populate ranges via VBA. Does anyone know, for example, why row ranges in formulas might suddenly start showing up as Roman numerals, and relative references go kablooey (highly technical term, there)? :-) Here's a code snippet: ' data validation for Order # With .Range("B2", Cells(myRow, 2)) .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:= _ "=COUNTIF(B:B,B2)1" .FormatConditions(1).Interior.ColorIndex = 22 ' pink .FormatConditions.Add Type:=xlExpression, Formula1:= _ "=MOD(ROW(),2)" .FormatConditions(2).Interior.ColorIndex = 24 End With I run the macro. Things that should be pink aren't. I look in the conditonal formatting for the cells in question. I see, e.g., for cell B2: =COUNTIF(II:II,HI3)1 Can someone explain that?! I change that manually to =COUNTIF(B:B,B2)1 and the row's cells format as I expected and wanted. There are other relative-reference errors as well. I have a couple of fairly long named expressions, which I created with the free Add-In "Names Manger" (the current version). Could I be overrunning some program limit and corrupting memory or something? Any ideas would be most appreciated. A long related posting of mine from the other day that exlains some of the other errors is here in this group as Message-ID: , which I posted on the 17 July 2007. -- dman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I correct rounding errors in Excel formulas? | Excel Worksheet Functions | |||
Nested IF AND OR function Inexplicable error | Excel Worksheet Functions | |||
Handling errors in formulas (how annoying are they!) | Excel Discussion (Misc queries) | |||
Errors in copying formulas | Excel Discussion (Misc queries) | |||
Unresolved Errors in IF Statements - Errors do not show in results | Excel Worksheet Functions |