Link Worksheets in the same Workbook

Rameses

Board Regular
Joined
Mar 3, 2010
Messages
137
Hi all

Please may you assist with this one

I would like to link Sheet 1 to Sheet 2 (Both sheets are in the same workbook)
so that sheet 2 displays the selected data of sheet 1

Also I dont want to show all of the data from sheet 1 ie. I only want to show everything in columns A,D, E & J only(from sheet1) into sheet 2 as A,B,C & D.

I would like to be able to make change in sheet a only but for these changes to be seen immediately in sheet b (master and slave scenario)

many thanks

Rameses
 
Hi AK.

I'll await the OP's response re the camera tool before working on your code but that could be changed into a Worksheet_Change event in sheet1.
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi

Thank VoG I like the Camera tool alot and can see its uses for the end user and for printing butsadly not for this one as i cant filter in the 1 sheet (it takes me back to the original)

Akashwani I will await VoG lol i really wouldnt know where to start!

many thanks

Rameses
 
Upvote 0
VoG

will the code resemble Mike G's from earlier post?

If so I am a bit of a VB novice and have entered the code and clicked on run but it came up with a blank excel spreadsheet and a dialogue box (see earlier post in this thread)

many thanks

Rameses

Ps Akashwani i like the addition of Rameses to spreadsheet hehehe ;):laugh: I am grateful for the time it has taken

this one has been puzzling me for a while!
 
Upvote 0
I have been fiddling with =sheet1! then selecting eachcolumn

Im sure the answer is simpler then entering code... but will that that now
 
Upvote 0
Hi Akashwani

I have tried your code but just get a dialogue box which says

'Run-error '9':

Subscript out of range'

Unfortunately I cant provide a screenshot as am in the windows side of my MAc (running parellels) and cant find the print screen button..lol!

any further advice much appreciated.


Any MVP's out htere?

many thanks

rameses
 
Upvote 0
Hi Rameses,

I'm using Excel 2007, if that makes a difference to how the code works I don't know, sorry.

Ak
 
Upvote 0
hi Akashwani

Im a bit of a novice whne entering code etc I am also using excel 2007

Just to go through the process

I went to the VB icon on the developer toolbar

I clicked on sheet 2 on the left

I then pasted the code into the box on the right
I then clicked on run

lol this time it comes up with a dialogue box which says

Run-time error 1004
Application-defined or object-defined error


I appreciate your help AK any further advice much appreciated

many thanks

Rameses
 
Last edited:
Upvote 0
Try this: right click Sheet1's tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Columns("A").Copy Destination:=Sheets("Sheet2").Range("A1")
Columns("D").Copy Destination:=Sheets("Sheet2").Range("B1")
Columns("E").Copy Destination:=Sheets("Sheet2").Range("C1")
Columns("J").Copy Destination:=Sheets("Sheet2").Range("D1")
Application.CutCopyMode = False
End Sub

then press ALT + Q to close the code window.
 
Upvote 0
Hi Peter,

That works great, as you knew it would :)

Hi Rameses,
I'm sorry, I should have explained that my code goes in a standard module, you can insert a button to Sheet2 and assign the Macro CopySheet1 to it.

Ak
 
Upvote 0
Hi VoG

Thankyou for this

I have tried this but when i then clickonto sheet 2 it is still blank

Any further advice?

many thanks

Rameses
 
Upvote 0

Forum statistics

Threads
1,224,879
Messages
6,181,531
Members
453,054
Latest member
ezzat

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top