Repeat columns across worksheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a workbook with 4 worksheets, and the first 3 columns of each worksheet should be the same, and be 'driven' by the first/main worksheet. If I add something to Cols A,B,C on sheet1, I want it on Sheets 2,3,and 4. Right now I'm using a very kludgey IF formula to copy the contents if there are any. Please enlighten me-- I've scoured the help files ad infinitum.

I'd also like the header for each worksheet to be the same. Right now I'm just copying the header cells but it seems there is probably a better way.

Thank--Jim
 
I suppose that we get data from A to B either by pulling it or b
pushing it.

Sounds like you are pulling it at the moment. By this I mean putting
formula in one place which picks up changes elsewhere. So maybe you pu
a formula in Sheet2!A1 which says =Sheet1!A1
No ifs: when Sheet1!A1 is filled, its value appears in Sheet2!A1.

I have had fun from time to time using "push" for a change.

So: you enter a value in Sheet1!A1. The VBA Worksheet_Change event i
activated and "sends" this value to whereever you want.

Sub Worksheet_change (ByVal Target As Range)

Worksheets("Sheet2").Range("A1")=Worksheets("Sheets1").Range("A1"
<(all one line)>
end sub

would then transfer the Sheet1 data in A1 to Sheet2 A1 as soon as yo
enter it. Do as many cells and as many sheets as you wish.

I find it a useful technique for getting numerical data to sta
numerical when feeding it into charts...
 
You can "Group" the sheets you want to modify simultaneously. With Sheet1
active hold down the shift key and click on the tab of Sheet4 (when you do
all between sheets should turn white in color as selected). What ever you
type in sheet1 will appear in sheet2, sheet3 and sheet4 (same cells).
Biggest problem... remember to "turn off" this feature as soon as you are
finished entering data you want on all the sheets. Right-click on any of
the 4 sheets an left click on Ungroup sheets. Done.
HTH


JimAZ said:
I have a workbook with 4 worksheets, and the first 3 columns of each
worksheet should be the same, and be 'driven' by the first/main worksheet.
If I add something to Cols A,B,C on sheet1, I want it on Sheets 2,3,and 4.
Right now I'm using a very kludgey IF formula to copy the contents if there
are any. Please enlighten me-- I've scoured the help files ad infinitum.
I'd also like the header for each worksheet to be the same. Right now I'm
just copying the header cells but it seems there is probably a better way.
 
Jim:

The most useful thing to remember with the Change event is that i
tells you the address of the cell you have changed. That is th
parameter (by val Target tells you the Range you have selected
whether one cell or many). For a single cell target.row an
target.column do the job.
You might want to check that target.count is 1.

Al
 
Back
Top