-
Solved: Named range quickie
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?? ;-)
[VBA] With Selection
.Formula = "=e12/range("Doors")"
.Copy
.PasteSpecial Paste:=xlPasteValues
End With[/VBA]
-
I figgered it out myself. I was over complicating things and only had to put "e12/Doors".
Thanks to anyone who looked.
-
Why not just use
[vba]
Selection.Value = Range("E12").Value / Range("Doors").Value
[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules