Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default alter code to apply to range (links cells w/ row insertions)

Is there any way to alter the following code to apply to a range? Currently,
I am applying this formula to each column, but it would be much easier to do
this for multiple columns at a time.

The code allows one to link a column of cells from sheet to sheet while
recognizing row insertions and deletions.

I took the following from a previous post by 'Max':

Assume the source col to be linked is col A in Sheet1, A1 down

In Sheet2
-------------
Put in any starting cell, say A1:
=OFFSET(INDIRECT("Sheet1!A1"),ROWS($A$1:A1)-1,)

Copy A1 down as many rows
as the linking is required to col A in Sheet1

This should now "recognize" any subsequent row* insertions / deletions in
Sheet1 (*or even column deletions in Sheet1)
viz. col A in Sheet2 will always point to what's in col A in Sheet1

Adapt to suit. For e.g. if you want to link to col B in Sheet3 instead,
change:

INDIRECT("Sheet1!A1")
to
INDIRECT("Sheet3!B1")

in the formula
--
Rgds
Max
xl 97
---

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 118
Default alter code to apply to range (links cells w/ row insertions)

HI

Try this, you can copy down and across as far as you need to go.
=OFFSET(INDIRECT("Sheet1!A1"),ROW()-1,COLUMN()-1)

If this helps, please click "Yes"
<<<<<<<<<<<


"purplec0ws" wrote:

Is there any way to alter the following code to apply to a range? Currently,
I am applying this formula to each column, but it would be much easier to do
this for multiple columns at a time.

The code allows one to link a column of cells from sheet to sheet while
recognizing row insertions and deletions.

I took the following from a previous post by 'Max':

Assume the source col to be linked is col A in Sheet1, A1 down

In Sheet2
-------------
Put in any starting cell, say A1:
=OFFSET(INDIRECT("Sheet1!A1"),ROWS($A$1:A1)-1,)

Copy A1 down as many rows
as the linking is required to col A in Sheet1

This should now "recognize" any subsequent row* insertions / deletions in
Sheet1 (*or even column deletions in Sheet1)
viz. col A in Sheet2 will always point to what's in col A in Sheet1

Adapt to suit. For e.g. if you want to link to col B in Sheet3 instead,
change:

INDIRECT("Sheet1!A1")
to
INDIRECT("Sheet3!B1")

in the formula
--
Rgds
Max
xl 97
---

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
How do i apply Goal Seek to a range of cells in Excel Mabvuto Excel Worksheet Functions 1 November 21st 08 06:30 AM
Alter pivot with code Steve Excel Discussion (Misc queries) 0 November 7th 07 09:23 PM
modify a macro to apply to a specific range of cells Dave F Excel Discussion (Misc queries) 2 April 25th 07 03:00 AM
How do i a apply range(autoformat) in non-adjacent cells? Brent from the Bahamas New Users to Excel 2 January 23rd 06 10:42 AM
How to apply rounding across a range of cells with other formulae Steve T Excel Worksheet Functions 1 October 20th 05 07:39 PM


All times are GMT +1. The time now is 07:20 AM.

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

About Us

"It's about Microsoft Excel"