PDA

View Full Version : Formula help



austenr
08-17-2010, 12:25 PM
Anyone see what would give me a "Object doesnt support this property or method" error:

If Sheets("Input + Wksheet").Age.Value < 65 And Sheets("Input + Wksheet").ColgagteHills.Value = "Colgate" _
And Sheets("Input + Wksheet").medcvg.Value = 1 And Sheets("Input + Wksheet").Range("D9").DateValue <= "7/1/1996" Then
MsgBox "Colgtate"
End If

austenr
08-17-2010, 12:32 PM
I know what the problem is but i thought you could use named ranges in code? Can you not?

Bob Phillips
08-17-2010, 01:29 PM
You can, but a name refers to a range, so you must use that object, like so



Sheets("Input + Wksheet").Range("ColgagteHills").Value

austenr
08-17-2010, 01:38 PM
ah...thanks Bob