473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to update single data in different sheets

Hi,,

How to update data that is in a table in sheet1 and the same data should appear in table in Sheet2 without copying and pasting.

For Ex:-

Sheet 1

the table contains Cost =1000

And this cost should also appear automatically in sheet 2 Cost =1000 table when ever some changes are made in Sheet 1.

Also please let me know if data can be updated in different Work books and not work sheet.

i,e. Can i update data in one work book and that data should be changed or reflected in a different workbook..

Thanks for the reply in advance.
Dec 10 '07 #1
4 1577
kadghar
1,295 Expert 1GB
Hi,,

How to update data that is in a table in sheet1 and the same data should appear in table in Sheet2 without copying and pasting.

...i,e. Can i update data in one work book and that data should be changed or reflected in a different workbook..

Thanks for the reply in advance.
yeap, remember you have a list of workbooks and of worksheets for each workbook. Lets say you have Book1 and Book2 and each one has Sheet1 and Sheet2

so if you want to put "hello" in the cell A1 or the first sheet of Book2 just do something like:

workbooks("Book2").worksheets("Sheet1").cells(1,1) .value = "hello"

well HTH
Dec 10 '07 #2
yeap, remember you have a list of workbooks and of worksheets for each workbook. Lets say you have Book1 and Book2 and each one has Sheet1 and Sheet2

so if you want to put "hello" in the cell A1 or the first sheet of Book2 just do something like:

workbooks("Book2").worksheets("Sheet1").cells(1,1) .value = "hello"

well HTH

Hi,

I am sorry but i dint get that,


Well first lets take only 1 work book thats, for ex:- there are 3 sheets if i update any data in sheet 1 the same changes should take place in sheet 2. As i told previously if the a Sheet 1 Cell A1 =1 then it should update in cell A1 = 1 in sheet 2 spontaneously.

Thanks in advance
Dec 11 '07 #3
Easily, if it is not a complex workbook or worksheet you could copy the cells on spreadsheet 2 and paste special, then paste link on spreadsheet 1 in the cells for update, then when you make an entry on spreadsheet 2, it will automatically update spreadsheet 1.

Hope that helps.
Dec 11 '07 #4
kadghar
1,295 Expert 1GB
Hi,

I am sorry but i dint get that,


Well first lets take only 1 work book thats, for ex:- there are 3 sheets if i update any data in sheet 1 the same changes should take place in sheet 2. As i told previously if the a Sheet 1 Cell A1 =1 then it should update in cell A1 = 1 in sheet 2 spontaneously.

Thanks in advance
That was the syntax to make reference to any cell, now if you want the changes to take efect when you change the cell, write the code in the sheet's change event, try this little example

Lets say you have sheet1 and sheet2, go to the vba editor, and 2ble click on
sheet1, then write something like:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.     worksheets(2).cells(target.row, target.column).value = target.cells
  3. End Sub
so when you change the value of a cell in sheet1, the same cell will be changed in sheet2.

HTH
Dec 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Ilan | last post by:
Hi all I need to add data from two Excel sheets (both on the same workbook) to an existing table in my SQL DB. The problem is that each sheet holds different fields for the same record, though...
3
by: indabert | last post by:
Hello, I have two tables (table1 and table2). I want to set a flag in table1 for each common row with table2. I use the following syntax UPDATE table1 SET flag='Y' from table1 INNER JOIN table2...
5
by: Klemens | last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction Do I have to change some settings to get done or ist this not possible by...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
5
by: Paul M | last post by:
Hi All, I've been tasked with writing a z/OS C program to read and update a table (DB/2 v8). This Table contains a single row with a single column of data. This program (which will run as a...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
22
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is...
2
by: lindabaldwin | last post by:
Hello everyone, I am fairly new to VBA. I have a worksheet in Excel, named "Data Sheet" from which I am trying to query data. This worksheet contains the following data: unit (column A), date...
3
by: keirnus | last post by:
hello, been searching for a solution on this but all i get are advices for importing data from excel directly to MS Access DB. my case here is different...the sheet in Excel file is not ready...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.