How to store relative cell values in variables & check it

  • Thread starter Thread starter B Subramanian Raman [Bala]
  • Start date 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.
 
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.
 
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.
 
Back
Top