Synchronizing worksheets

  • Thread starter Thread starter lahill
  • Start date Start date
L

lahill

I am creating a database that contains a master worksheet (Sheet 1) and
multiple additional worksheets. I would like the information on Sheet 10 to
contain the same information as Sheet 1, even when data is deleted/added.

I have tried many codes but it still resolves in an error. Is there a
simple code I can use?
 
Larissa
Do you want all the information that's in Sheet1 to be in Sheet10 in the
same cells? If so, then I recommend that you use a Worksheet_Change event
macro in Sheet1 and that this macro be coded to simply delete Sheet10 and
make a copy of sheet1 and name that copy the name of Sheet10. That macro
would fire whenever the contents of any cell in Sheet1 is changed. Post
back if this seems like what you want. HTH Otto
 
Hi

One way would be to call this macro whenever you require

Sub CopySh1toSh10()
Application.DisplayAlerts = False
Sheets("Sheet10").Delete
Sheets("Sheet1").Copy After:=Sheets("Sheet9")
Sheets("Sheet1 (2)").Name = "Sheet10"
Application.DisplayAlerts = True
End Sub
 
I thought about that code, but the data I'm using in Sheet10 is in a
different format than Sheet1 (yes, in different cells). In other I want to
obtain the data from Sheet1, but in a different formation.
 
Larissa
If that is what you want, use the following macro:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.DisplayAlerts = False
Sheets("Three").Delete
Application.DisplayAlerts = True
Sheets("Master").Copy After:=Sheets(Sheets.Count)
Sheets("Master (2)").Name = "Three"
Sheets("Master").Select
End Sub
This is a sheet event macro and must be placed in the sheet module of your
master sheet. I assumed your master sheet is named "Master" and your
Sheet10 sheet is named "Three". Change these in the code as needed. To
access the sheet module, right-click on the sheet tab, select View Code, and
paste this macro into that module. "X" out of the module to return to your
sheet. HTH Otto
 
Larissa
Then you will have to furnish the layout of both sheets so that someone
can help you. Otto
lahill said:
I thought about that code, but the data I'm using in Sheet10 is in a
different format than Sheet1 (yes, in different cells). In other I want
to
obtain the data from Sheet1, but in a different formation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top