Monitoring Changes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have two worksheets , 5 colums and 5 rows,
to monitor differences btw the two I want to do the following:

If Cell A3 has changed I want to copy the whole row (3rd row), embolden A3
and
copy this over to another spreadsheet, in my code below the embolden part
doesn't function, your help is greatly appreciated.


Sub des()

k = 1
For i = 1 To 5
For j = 1 To 5
If Workbooks("WIP 20-12-04").Worksheets("Jobs").Cells(i, j)
<> Workbooks("WIP 13-12-04").Worksheets("Jobs").Cells(i, j) Then
Workbooks("WIP 20-12-04").Worksheets("Jobs").Cells(i,
j).EntireRow.Copy Destination:=Worksheets("Changes").Cells(k, 1)
And Workbooks("WIP 20-12-04").Worksheets("Changes").Cells(i, j).Font.Bold =
True
k = k + 1
End If
Next j
Next i
End Sub
 
It isn't totally clear what needs to be emboldened, but I assumed the cell
causing the row to be copied.


Sub des()

k = 1
For i = 1 To 5
For j = 1 To 5
If Workbooks("WIP 20-12-04").Worksheets("Jobs").Cells(i, j) _
<> Workbooks("WIP 13-12-04").Worksheets("Jobs").Cells(i, j) Then
Workbooks("WIP 20-12-04").Worksheets("Jobs").Cells(i,j) _
.EntireRow.Copy Destination:=Workbooks("WIP 20-12-04"). _
Worksheets("Changes").Cells(k, 1)
Workbooks("WIP 20-12-04").Worksheets("Jobs").Cells(i,j) _
.Font.Bold = True
k = k + 1
End If
Next j
Next i
End Sub

Note that if A3 and B3 are different, then row 3 would be copied twice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top