help converting text to range object

J

jimredfield

I have a cell range identifier masquerading as a text entry in a cell
(e.g.,the cell at G19 contains the text "D14:F20"). Within my macro, I
want to grab that D14:F20 text string, convert it into a range
reference, and use that range reference within the macro. I can't
figure out how to make the text-to-range conversion.

Another question along the same lines: I have a single cell (e.g. B4)
and I want the text within that cell to echo its location (e.g., "B4")
such that if the cell is moved elsewhere the text revises appropriately
(e.g., if the cell moves from B4 to F9, the text within changes to "F9"
too).

(Using Mac Excel 2001.)

Relative newbie to this -- help(s) appreciated.

- Jim
 
R

Ronald Dodge

Put that string inside of the range object like the following

Range(Range("G19").Value)

NOTE: You may have to prequalify the Range Objects above. If left the way
it is, it will refer to the ActiveWorksheet within the ActiveWorkbook.
 
T

Tom Ogilvy

assume it contains D14:F20 and not "D14:F20"
msgbox Range(Range("G19").Value).Address

=address(row(),Column(),4)
 

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

Top