Posts

Showing posts from March, 2018

Macro to Read the File Properties for the photos and Put them into Folders by Year and Date

Below Macro helps in opening the Photo or Image Files and read the properties along with Camera the Photo Captured and Dates along with locations and create the Folders by Year, Month and Date if the folders doesn't exist and copy the photos to that folder. 'Creating a FileSystemObject 'Public FSO As New FileSystemObject Sub ListFiles() 'Declaring variables Dim objFolder As Folder Dim objFile As File Dim strPath As String Dim NextRow As Long 'Specify the path of the folder strPath = "E:\My Photos\2005\1152005\" 'Create the object of this folder Set objFolder = FSO.GetFolder(strPath) 'Check if the folder is empty or not If objFolder.Files.Count = 0 Then   MsgBox "No files were found...", vbExclamation   Exit Sub End If 'Adding Column names for A, B, and C Cells(1, "A").Value = "File Name" Cells(1, "B").Value = "Size" Cells(1, "C").Value = "Modified Date/Time...

Macro to Compare two Spreadsheets row by row for each column

Image
Attached macro enabled spreadsheet will do the compare of the Source and Target Spreadsheet for each row and all the listed columns. Instructions to Use: 1) Do not delete or change the Sheet Name or File Name of the Macro File. 2) Fill in the Data in the Data Sheet like Source File Path, Source File Name, target File Path, Target File Name, Sheet Names (Source and Target) 3) Also enter the Start Row and Total Columns in the Sheet to Compare 4) Enter the total number of rows in the File 5) Enter the Header Row Number and Column Number from where the data begins. 6) Enter the column which will represent as the Key for Search. Click on the Validate button to compare and give you the results. Sub Validation() DataSheetValidation Housekeeping End Sub Sub Housekeeping() Dim sfileName, tfileName, sFolderName, tFolderName As String Dim sSheetName, tSheetName As String Dim nCol As Integer, stRowNum As Integer 'Variables     'Windows("Validation.xlsm"...