View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Displaying range value when range name is concatenated

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)

Barb Reinhardt wrote:

Dave,

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

Thanks

"Dave Peterson" wrote:

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.

Barb Reinhardt wrote:

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?

"Gary''s Student" wrote:

Sub missive()
s = InputBox("enter range name: ")
MsgBox (Range(s).Address)
End Sub
--
Gary's Student


"Barb Reinhardt" wrote:

I have this in cell A1:

="PlanMonth" & row()
I'd like to display the range name that matches "PlanMonth1". How do I do
that?


--

Dave Peterson


--

Dave Peterson