
VBA EXCEL MACRO - compares two files and put results in a third
- or -
Post a project like this601
€450(approx. $510)
- Posted:
- Proposals: 20
- Remote
- #4048129
- OPPORTUNITY
- Awarded
⭐ TOP RATED ⭐ Graphic Designer| WordPress / WIX | 3D Architecture | Video Editing |Photoshop Expert

Expert In Web Scraping | Data Entry |E-Commerce | VBA | Data Collection |Python

Excel Expert |WordPress| Google Sheets |VBA & Google App Script | Woocommerce

Skillful Game Developer | AI engineer | Mobile App Developer | Graphics Designer
368484733061741449433351470229726627829771709451123738313542283213974958492310074157




Description
Experience Level: Expert
Estimated project duration: 1 - 2 weeks
Hi all,
Every working day I have a new .csv file containing a list of products. Every month I restart the cycle with a new file; so every month I have 21-23 files starting from the first working day of the month.
In this zip file you have all files of March 2023 and the last day of February 2023. The number (first 8 chracters of the filename represent the date, year_month_day format. Ie:
20230330_Aggiornamento Prezzi Retail - MARZO.csv
Is for:
2023 = year
03 = month
30 =day
Every row of the file identifies a single, unique product: I cannot have a single file with two identical rows.
Every row is identified by three variables:
1. “Codice offerta”; Column C: the unique code of the product (it is an alphanumeric number, in this example I used a fake string)
2. “Nome Trader”; Column B: the name of the company
3. “Nome offerta” ; Column D: the name of the product
The first column “Data Rilevazione” (Column A) indicates the the date of the single day.
Other colums (E to W) are parameters.
Every file has the same column of the preceding file (the file of the day before).
Every row/product, identified by columns B-C-D,can assume three conditions (do not consider the date in Column A):
1. is identical to that of the day before
2. is not identical to that of the day before, in one or more values of the E to W columns
3. is new, it means that the product did not exist in the file of the day before
There is a fourth condition
4. the row (product) does not exist, but exists in the file of the day before
In short:
1. the product is the same of the day before
2. the product has changed
3. the product is new
4. the product is no longer offered
I need a VBA EXCEL 2007 MACRO that compares the two files and put the results in an Excel file like this: “Aggiornamento Prezzi Retail - MARZO.xlsx”.
I start with the file of the last day of the month before (in the example, February 28, 2023; this file will be the “master file” for the month of March) the macro must run using this file as the basis of the routine. Al the date in Col. A are in yellow.
Results depends on the four conditions we saw before:
1. nothing happens
2. the new row is inserted under the old one in the “Aggiornamento Prezzi Retail - MARZO.xlsx”; all the cells in E to W columns that had changed become green
3. the whole row is inserted, in alphabetical order by Col. B and Col. D, in the “Aggiornamento Prezzi Retail - MARZO.xlsx” and all the row cells become green (even the Col. A)
4. the old row in “Aggiornamento Prezzi Retail - MARZO.xlsx ”becomes light gray” (even the Col. A)
During the year columns can change (ie, adding a parameter column)… it is not my fault… but it can happen. So I need an excel “parameters file” where I can identify ID columns (in this case B, D, C); date column (A); parameter column (E-W). In this file I have to identify, also, the “master file” (the last one of the month before), all others file are in one working directory.
Thanks,
Arnaldo
PS
PPH does non accept more than 3 files (and non .csv). I have uploaded an example in .txr; if you are interested, I will send all the .csv files for the work.
Every working day I have a new .csv file containing a list of products. Every month I restart the cycle with a new file; so every month I have 21-23 files starting from the first working day of the month.
In this zip file you have all files of March 2023 and the last day of February 2023. The number (first 8 chracters of the filename represent the date, year_month_day format. Ie:
20230330_Aggiornamento Prezzi Retail - MARZO.csv
Is for:
2023 = year
03 = month
30 =day
Every row of the file identifies a single, unique product: I cannot have a single file with two identical rows.
Every row is identified by three variables:
1. “Codice offerta”; Column C: the unique code of the product (it is an alphanumeric number, in this example I used a fake string)
2. “Nome Trader”; Column B: the name of the company
3. “Nome offerta” ; Column D: the name of the product
The first column “Data Rilevazione” (Column A) indicates the the date of the single day.
Other colums (E to W) are parameters.
Every file has the same column of the preceding file (the file of the day before).
Every row/product, identified by columns B-C-D,can assume three conditions (do not consider the date in Column A):
1. is identical to that of the day before
2. is not identical to that of the day before, in one or more values of the E to W columns
3. is new, it means that the product did not exist in the file of the day before
There is a fourth condition
4. the row (product) does not exist, but exists in the file of the day before
In short:
1. the product is the same of the day before
2. the product has changed
3. the product is new
4. the product is no longer offered
I need a VBA EXCEL 2007 MACRO that compares the two files and put the results in an Excel file like this: “Aggiornamento Prezzi Retail - MARZO.xlsx”.
I start with the file of the last day of the month before (in the example, February 28, 2023; this file will be the “master file” for the month of March) the macro must run using this file as the basis of the routine. Al the date in Col. A are in yellow.
Results depends on the four conditions we saw before:
1. nothing happens
2. the new row is inserted under the old one in the “Aggiornamento Prezzi Retail - MARZO.xlsx”; all the cells in E to W columns that had changed become green
3. the whole row is inserted, in alphabetical order by Col. B and Col. D, in the “Aggiornamento Prezzi Retail - MARZO.xlsx” and all the row cells become green (even the Col. A)
4. the old row in “Aggiornamento Prezzi Retail - MARZO.xlsx ”becomes light gray” (even the Col. A)
During the year columns can change (ie, adding a parameter column)… it is not my fault… but it can happen. So I need an excel “parameters file” where I can identify ID columns (in this case B, D, C); date column (A); parameter column (E-W). In this file I have to identify, also, the “master file” (the last one of the month before), all others file are in one working directory.
Thanks,
Arnaldo
PS
PPH does non accept more than 3 files (and non .csv). I have uploaded an example in .txr; if you are interested, I will send all the .csv files for the work.

Arnaldo F.
100% (16)Projects Completed
15
Freelancers worked with
12
Projects awarded
89%
Last project
22 Nov 2024
Italy
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Hello Arnaldo,
1. Your examples are missing.
2. Are you sure that the only way to solve this is using VBA?
Thank you in advance,
Carlos -
Please provide the files or a sample of them to better assess this project and the best way forward.
-
Hi Arnaldo,
You have missed out the attachment. Please provide the sample files to look more on this job.
Thanks
Sumit
SaS Technologies
107132110713091071300
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies