How to update single data in different sheets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • satish12
    New Member
    • Dec 2007
    • 5

    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.
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by satish12
    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("Book 2").worksheets( "Sheet1").cells (1,1).value = "hello"

    well HTH

    Comment

    • satish12
      New Member
      • Dec 2007
      • 5

      #3
      Originally posted by kadghar
      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("Book 2").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

      Comment

      • mcreary
        New Member
        • Sep 2006
        • 4

        #4
        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.

        Comment

        • kadghar
          Recognized Expert Top Contributor
          • Apr 2007
          • 1302

          #5
          Originally posted by satish12
          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:

          [CODE=vb]Private Sub Worksheet_Chang e(ByVal Target As Range)
          worksheets(2).c ells(target.row , target.column). value = target.cells
          End Sub[/CODE]

          so when you change the value of a cell in sheet1, the same cell will be changed in sheet2.

          HTH
          Last edited by kadghar; Dec 11 '07, 04:06 PM. Reason: add code tags

          Comment

          Working...