Range Name question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a range name that's called "PlanMonth1" and I'd like to reference it
within my code.

What I want to do is something like this:

Debug.Print "Range Value = ", Range("PlanMonth" & ActiveCell.Offset(0,
-1).Value).Value


but I'm getting an error. What am I doing wrong?

Thanks

Method Range of object worksheet failed.
 
If you have additional named ranges like

PlanMonth1
and activecell.offset(0,-1) contains 1, and PlanMonth1 refers to a single
cell, then that should work.
 
Providing the cell left of the activecell contains '1' and you have a named
range "PlanMonth1" your code should work. That is assuming the named range
is only one cell, otherwise it would return an array of values.

Trust the responses from Jim Thomlinson and I to your post yesterday
answered your question.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top