Thread: reconciliation
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John[_50_] John[_50_] is offline
external usenet poster
 
Posts: 2
Default reconciliation

dim i as integer, j as integer
for i = 1 to maxrows
for j = 1 to maxcols
if sheets("Sheet1").cells(i,j) = sheets("Sheet2")_
.cells(i,j) then
sheets("Sheet1").cells(i,j).ClearContents
sheets("Sheet2").cells(i,j).ClearContents
endif
next j
next i


this deletes the data that is matched in both sheets.
John.
-----Original Message-----
can anybody help with the VBA for comparing data in two

worksheets and
delete the matching data or copy the data that cannot be

matched
.