PDA

View Full Version : Solved: Named range quickie



jmenche
02-12-2007, 12:06 PM
Howdy,

I have a range named "Doors", but I am having a hard time referring to it in VBA. I am trying to fill a range with a formula and the formula contains the named range. Here's the code that I am trying to use. I know that the quotation thing is a problem but I even tried to double up on them and it still doesn't work. I know that I can just use the cell reference but what would I learn by doing that?? ;-)

With Selection
.Formula = "=e12/range("Doors")"
.Copy
.PasteSpecial Paste:=xlPasteValues
End With

:beerchug:

jmenche
02-12-2007, 12:25 PM
I figgered it out myself. I was over complicating things and only had to put "e12/Doors".

Thanks to anyone who looked.

Bob Phillips
02-12-2007, 12:33 PM
Why not just use



Selection.Value = Range("E12").Value / Range("Doors").Value