tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,194
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I need a macro that can compair two open documents find what names are missing and make a list
So this is what i need:
I have two open documents the main one is Called "Monthly Data.xlsm"
and the other is "Users.csv"
the macro will be run on the main one,
so "Monthly Data.xlsm" has a Sheet"Employees" in this sheet we have all employees and in column Z we have an Identifying Number (Unique to that person)
"Users.csv" is a csv i download from our wages software that list all the employees in the company,
in theory both list should be the same but to often the CSV has more names that master
so what i'm thinking is,
to get a macro that when run goes to "Users.csv" looks down column "B" and compares the numbers to the numbers in "Monthly Data.xlsm "Sheet"Employees" column z
if every number in the CSV is in the employees sheet then messagbox "All OK"
if not make a list of the numbers missing from the csv but also the names (the numbers are in coloumn B, First names in D and last names in G, take this data and make a list in sheet "Employees" From AD2
mesagebox " The following names are missing from the system" (then if possible list the number and name in the mesage box as well)
hope someone can help me with this?
Thanks
Tony
I need a macro that can compair two open documents find what names are missing and make a list
So this is what i need:
I have two open documents the main one is Called "Monthly Data.xlsm"
and the other is "Users.csv"
the macro will be run on the main one,
so "Monthly Data.xlsm" has a Sheet"Employees" in this sheet we have all employees and in column Z we have an Identifying Number (Unique to that person)
"Users.csv" is a csv i download from our wages software that list all the employees in the company,
in theory both list should be the same but to often the CSV has more names that master
so what i'm thinking is,
to get a macro that when run goes to "Users.csv" looks down column "B" and compares the numbers to the numbers in "Monthly Data.xlsm "Sheet"Employees" column z
if every number in the CSV is in the employees sheet then messagbox "All OK"
if not make a list of the numbers missing from the csv but also the names (the numbers are in coloumn B, First names in D and last names in G, take this data and make a list in sheet "Employees" From AD2
mesagebox " The following names are missing from the system" (then if possible list the number and name in the mesage box as well)
hope someone can help me with this?
Thanks
Tony