vba - Excel sheet comparison - any order -
i'm looking way compare 1 excel sheet another. there way compare whole records, without regard order of records?
i think work... columns may have modified bit depending on width.
private sub comparesheets() dim first_index integer dim last_index integer dim sheet1 worksheet dim sheet2 worksheet dim r1 integer dim r2 integer dim found boolean set sheet1 = worksheets(1) set sheet2 = worksheets(2) application.screenupdating = false first_index = 1 last_index = sheet1.range("a" & rows.count).end(xlup).row r2 = first_index last_index found = false r1 = first_index last_index if sheet1.cells(r1, 16) = sheet2.cells(r2, 9) ' found match. found = true exit end if next r1 if not found ' if if did not find it??? end if next r2 application.screenupdating = true end sub
Comments
Post a Comment