Avatar of Adam Elsheimer
Adam ElsheimerFlag for Germany

asked on 

Overwrite existing values in a Master file when master file is updated or opened

Q: I would like overwrite existing values when I update or open the master file. I am copying all Data files in a folder to a master file. To avoid duplicates I would like overwrite existing data in the master file.

User generated image

Thank you.

Regards,


Adam
Master.xlsm
Slave1.xlsx
Microsoft OfficeVBAMicrosoft ExcelVB Script

Avatar of undefined
Last Comment
Shums Faruk
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Adam,

I wouldn't recommend to update as it opens. You might not have updated the Slave file, accidentally if you open Master, it will get over written.
Secondly over written means, you want to clear previous records and update with new ones or you want to copy new record and then delete duplicate values?
Avatar of Adam Elsheimer

ASKER

1. You are correct. updating as it opens is tricky.

2. If the user adds new data in the data file it should added to the master file when I click update master file. I don't know which solution is better and don't understand the difference.

In daily routine the user adds new records to her/his data file. Task is: New records should added to the master file. Old records should be saved in the master too.

What is the better solution? overwrite or just add new records to avoid duplicates.
Avatar of Shums Faruk
Shums Faruk
Flag of India image

OK got it.

You need to append new records after old records, better not to clear old records then.

Let me work on it.
Avatar of Adam Elsheimer

ASKER

Thank you
Avatar of Adam Elsheimer

ASKER

For your information to avoid wasting your time and missunderstanding here  the daily routine:

In a Folder I have 30 Data files. Each User has a Data file ( Data1, Data2, etc.)
In the same Folder I have the master file where I collect/copy all data from the files of the users.

The table structure is in all Data Files the same.

Thanks you.

Regards,

Adam.
ASKER CERTIFIED SOLUTION
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Adam Elsheimer

ASKER

Shums, many thanks for your very fast and uncomplicated help. It is simple perfect and easy to customize.
Avatar of Shums Faruk
Shums Faruk
Flag of India image

I am glad that it worked in 1st attempt without any error. You'r are always welcome Adam.
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo