Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Use relative reference to change column link??

Hi all - I think this should be rather simple.
Unfortunately, I have not been able to figure it out & I'm
getting frustrated! Put simply, this is what I want to do:

I have two spreadsheets (ss1 & ss2). Range("b10:b25") of
ss1 is linked to a column (which contains current week
stats) in ss2. Each week new data is added to ss2,
resulting in the column containing the current week stats
being adjusted one column to the right, i.e., prior week
stats are now in column "AA" and current week stats in
column "AB" - row numbers stay constant.

I would like a macro to open ss1, select range("b10:b25"),
and automatically change the link to ss2 from column "AA"
to column "AB" (maybe using R1C1 reference ??).

Any help would be greatly appreciated :D

Thx, Kathryn


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Use relative reference to change column link??

Kathryn,

You can do this more simply with a formula:
Put this in B10 of ss1 and fill down to B25
=OFFSET(ss2!B10,0,COUNTA(ss2!$10:$10)-1)

The formula counts the entries in row 10 of ss2 to determine the offset
column. The '-1' is an adjustment to the column count (adjust as needed).
It assumes that row 10 always has an entry...

The formula is self adjusting so no macro or change is needed...

--
sb
"Kathryn" wrote in message
...
Hi all - I think this should be rather simple.
Unfortunately, I have not been able to figure it out & I'm
getting frustrated! Put simply, this is what I want to do:

I have two spreadsheets (ss1 & ss2). Range("b10:b25") of
ss1 is linked to a column (which contains current week
stats) in ss2. Each week new data is added to ss2,
resulting in the column containing the current week stats
being adjusted one column to the right, i.e., prior week
stats are now in column "AA" and current week stats in
column "AB" - row numbers stay constant.

I would like a macro to open ss1, select range("b10:b25"),
and automatically change the link to ss2 from column "AA"
to column "AB" (maybe using R1C1 reference ??).

Any help would be greatly appreciated :D

Thx, Kathryn




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Use relative reference to change column link??

Steve, thanks for your response. It never occurred to me
to use a formula; your right, it is much easier! I've
adjusted the spreadsheet & it works great.

Thanks again, Kathyn


-----Original Message-----
Kathryn,

You can do this more simply with a formula:
Put this in B10 of ss1 and fill down to B25
=OFFSET(ss2!B10,0,COUNTA(ss2!$10:$10)-1)

The formula counts the entries in row 10 of ss2 to

determine the offset
column. The '-1' is an adjustment to the column count

(adjust as needed).
It assumes that row 10 always has an entry...

The formula is self adjusting so no macro or change is

needed...

--
sb
"Kathryn" wrote in

message
...
Hi all - I think this should be rather simple.
Unfortunately, I have not been able to figure it out &

I'm
getting frustrated! Put simply, this is what I want to

do:

I have two spreadsheets (ss1 & ss2). Range("b10:b25") of
ss1 is linked to a column (which contains current week
stats) in ss2. Each week new data is added to ss2,
resulting in the column containing the current week

stats
being adjusted one column to the right, i.e., prior week
stats are now in column "AA" and current week stats in
column "AB" - row numbers stay constant.

I would like a macro to open ss1, select range

("b10:b25"),
and automatically change the link to ss2 from

column "AA"
to column "AB" (maybe using R1C1 reference ??).

Any help would be greatly appreciated :D

Thx, Kathryn




.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Use relative reference to change column link??

Kathryn,

You're welcome!

And one thing you'll find is that using the Offset function, your formulas
won't get messed up if you delete cells...

Happy Exceling...

--
sb
"Kathryn" wrote in message
...
Steve, thanks for your response. It never occurred to me
to use a formula; your right, it is much easier! I've
adjusted the spreadsheet & it works great.

Thanks again, Kathyn


-----Original Message-----
Kathryn,

You can do this more simply with a formula:
Put this in B10 of ss1 and fill down to B25
=OFFSET(ss2!B10,0,COUNTA(ss2!$10:$10)-1)

The formula counts the entries in row 10 of ss2 to

determine the offset
column. The '-1' is an adjustment to the column count

(adjust as needed).
It assumes that row 10 always has an entry...

The formula is self adjusting so no macro or change is

needed...

--
sb
"Kathryn" wrote in

message
...
Hi all - I think this should be rather simple.
Unfortunately, I have not been able to figure it out &

I'm
getting frustrated! Put simply, this is what I want to

do:

I have two spreadsheets (ss1 & ss2). Range("b10:b25") of
ss1 is linked to a column (which contains current week
stats) in ss2. Each week new data is added to ss2,
resulting in the column containing the current week

stats
being adjusted one column to the right, i.e., prior week
stats are now in column "AA" and current week stats in
column "AB" - row numbers stay constant.

I would like a macro to open ss1, select range

("b10:b25"),
and automatically change the link to ss2 from

column "AA"
to column "AB" (maybe using R1C1 reference ??).

Any help would be greatly appreciated :D

Thx, Kathryn




.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change a cell reference from relative to absolute Fred Holmes Excel Discussion (Misc queries) 2 June 4th 09 02:03 AM
Can you change the relative reference of a cell in an Excel formul Rod Bowyer Excel Discussion (Misc queries) 4 July 14th 07 01:22 AM
how do I change macro relative reference? no stop recording tool G Excel Discussion (Misc queries) 1 November 11th 06 08:09 PM
relative reference when creating a link to another workbook Stefi Excel Worksheet Functions 0 November 3rd 06 12:26 PM
How do I change a cell from absolute reference to relative referen simonsez Excel Discussion (Misc queries) 1 May 17th 05 08:39 PM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"