vikas_newports
Board Regular
- Joined
- May 26, 2016
- Messages
- 121
- Office Version
- 365
- Platform
- Windows
Hello
I want to extract the difference between two excel files and save it to my Maco files sheet name (NEW_RECORDS)
File Names changes on daily basis so I am selecting Files manually
File1 have old records and File 2 have new records. I am finding the new records based upon Column C (Account IDs)
I am using vlookup before automating it
I need your suggestion to achieve it.
my code is as under
I want to extract the difference between two excel files and save it to my Maco files sheet name (NEW_RECORDS)
File Names changes on daily basis so I am selecting Files manually
File1 have old records and File 2 have new records. I am finding the new records based upon Column C (Account IDs)
I am using vlookup before automating it
I need your suggestion to achieve it.
my code is as under
VBA Code:
Sub New_Records()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Dim FileToOpen As Variant
Dim OpenBook As Workbook
Dim FileToOpen1 As Variant
Dim OpenBook1 As Workbook
'Select File to be Open
FileToOpen = Application.GetOpenFilename(Title:="Select File1", FileFilter:="CSV Files (*.csv*),*csv*")
If FileToOpen <> False Then
Set OpenBook = Application.Workbooks.Open(FileToOpen)
End If
Application.ScreenUpdating = True
'Select File to be Open
FileToOpen1 = Application.GetOpenFilename(Title:="Select File2", FileFilter:="CSV Files (*.csv*),*csv*")
If FileToOpen1 <> False Then
Set OpenBook1 = Application.Workbooks.Open(FileToOpen1)
End If
Application.ScreenUpdating = True
End Sub