excel vba check if 2 files are identical code example Example: vba check if two sheets are the same If sheet1 Is sheet2 Then Debug.Print("Same workbook")