Beware Of Naming Conflicts

Be careful when using special characters to name objects. For instance, don't try to create a temporary worksheet named Histo$Tmp. It's possible, since Excel allows a worksheet name with a $ character. But using VBA to create a named range on that worksheet fails—the line defining the name will give the message "Error in formula". This is because the $ character is a special character for absolute cell references. It's good practice to stick to the simplest possible styles for naming objects…especially if the code is behaving in strange ways.