• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

updating by copying data from one workbook to another

paradise

Member
Hi ,

Currently I am facing problem.I have two workbooks.They are-

1.Entry.xlsx
2.Report.xlsx

Entry.xlsx contains only worksheet, whereas Report.xlsx has more than one worksheets.

I want to tell you that 'Entry'workbook I simply receive from other department.From this workbook I have to copy exactly the same data into another workbook 'Report'.Once,I can copy the whole sheet but next time,again when I receive the 'Entry'workbook but this time I cannot copy.It is so becoz there are changes in certain cells either partly cells or wholly.Hence would require those changes cells to be copied in one hand.

Secondly, that if any changes made by me in 'Report' workbook then those changes should not be overwritten by 'Entry' workbook data.

Thirdly,those updated figure to be shown as history in a separate sheet in 'Report' workbook.

Hope all of have understood.In summary, I want

1.Copy & update data from Entry.xlsx to Report.xlsx
2.If any changes in cell/s made in Report.xlsx then those specific changes should not be overwritten/updated/copied/modified from Entry.xlsx while updating from this Entry.xlsx workbook into Report.xlsx workbook
3.If possible changes made to Report.xlsx from Entry.xlsx should be shown in summary in a separate sheet.

I will be very much thankful ,if anyone can solve or help me in solving this 3 cases or at least 1 or 2 or all.

If any further info if you require then do let me know.I will be eagerly waiting for the reply.

With Best Rgds
 
Based on what you wrote, I think one simplistic way to do it would be:
  1. Select the cells in Entry workbook, copy
  2. Paste a link to the cells in Report workbook. All cells here should now be formulas (this meets requirement #1)
  3. If you manually make a change to Report workbook, link gets overwritten and broken (meets requirement #2)
  4. To find which cells have been modifed, you can use the Go to - Specials - Constants, or we could (possibly meeting requirement #3)
Would this work for you?
 
Dear Sir,

Thanks for your reply.I have tried.I thought of using a macro that would automate the task.

Pls find enclosed in attachment a sample file name 'Entry.xlsx' which I receive daily as the data is entered on daily basis.I want to copy this data by macro into a workbook name "Report.xlsx" which is very heavy .So,I am expecting a macro/vba code that automatically copies the filled up data in highlighted cells or in blank cells.The format in the Report.xlsx are same nothing is different.Difference is only of blank cells in Report workbook.This blanks cells is being filled datewise in Entry.xlsx.Those cells data is needed to be copied into an existing Report.xlsx workbook.

It should be noted that latest dates are mentioned in those rows or column.Hence,I want to track those last/latest date of entry of 'Entry.xlsx' if possible by a macro.

If those things are if not possible by macro ,kindly let me know how can I copy the entire data along with the same format from Entry.xlsx (enclosed below) into a existing Report.xlsx which itself has a lot of worksheets.

With Best Rgds,
 

Attachments

  • Entry.xlsx
    661.2 KB · Views: 3
I found below code in the web,but it is producing an error.In this I want to add format condition also i.e
.PasteSpecial xlFormats

Code:
Sub copy()
Dim x As Long
x = Workbooks("Entry.xlsx").Worksheets("Input").Cells(Rows.Count, 4).End(xlUp).Row
Workbooks.Add
ActiveWorkbook.Filename:="Report.xlsx"
Workbooks("Entry.xlsx").Worksheets("Input").Range("A1:BVZ84" & x).copy
Worksheets("Input").Range("A1").PasteSpecial Paste:=xlAll, Operation:=xlNone
ActiveWorkbook.Save
MsgBox "complete"
End Sub
 
Back
Top