Displaying range value when range name is concatenated

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

Guest

I have this in cell A1:

="PlanMonth" & row()
I'd like to display the range name that matches "PlanMonth1". How do I do
that?
 
I guess I wasn't clear with my question.

I'd like to display the value of the range that has the following range name
="PlanDate" & 1
for example.
How do I do that?
 
Dim TestRng as range

set testrng = nothing
on error resume next
set testrng = "PlanDate" & "1"
on error goto 0

if testrng is nothing then
'not a valid range name
else
msgbox testrng.cells(1).value
end if

You have another response at your earlier thread, too.
 
Dave,

I've not used "Evaluate" often for ranges. Are there times when it's
required?

Thanks
 
I didn't use evaluate in this code. I don't think I've ever used it to retrieve
a value from a range. But I have used it to get the value from a name.

But in the other thread, I wanted to show the difference between the
evaluate(...value) and just .value.

(=2000 and 2000, for instance)
 

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