How to store relative cell values in variables & check it

  • Thread starter B Subramanian Raman [Bala]
  • Start date
B

B Subramanian Raman [Bala]

I wish to know how to store the relative cell reference in a variable that
can be checked while designing a macro in MSOffice 2003.
 
M

Mike H

Hi,

Like this

r = Range("A1").Address(0, 0)

change to zeroes to 1's for different address types
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
M

Mike H

looking again the question in the header is different to the question in the
body of the thread

RE: How to store relative cell 'values' in variables & check it

or
I wish to know how to store the relative 'cell reference' in a variable

So my previous post addressed (no pun intended) the second question and to
the first perhaps we could use 'offset'

r = Range("A1").Offset(1, 2).Value

the (1,2) refers to 1 row down and 2 columns to the right. You would use
negative values for Left and UP.

-
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

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