ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simple Thing (https://www.excelbanter.com/excel-programming/318734-simple-thing.html)

Brian

Simple Thing
 
I want to set a variable equal to a relative cell. How do
I do that. My small brain can't seem to think of anything
else except for the below. Thanks, Brian


Set rng1 = Worksheets("sheet 1").ActiveCell.Offset(11,
0).Range("A1")
(This does not make it relative... hmm any ideas..

Bob Phillips[_6_]

Simple Thing
 
What exactly do you mean by a relative cell?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Brian" wrote in message
...
I want to set a variable equal to a relative cell. How do
I do that. My small brain can't seem to think of anything
else except for the below. Thanks, Brian


Set rng1 = Worksheets("sheet 1").ActiveCell.Offset(11,
0).Range("A1")
(This does not make it relative... hmm any ideas..




David

Simple Thing
 
Hi Brian,
If you are on the cell you want to capture, Z= activecell.value
If the cell is relative, Z=activecell.offset(1,1).value


"Brian" wrote:

I want to set a variable equal to a relative cell. How do
I do that. My small brain can't seem to think of anything
else except for the below. Thanks, Brian


Set rng1 = Worksheets("sheet 1").ActiveCell.Offset(11,
0).Range("A1")
(This does not make it relative... hmm any ideas..



All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com