Damien
I have a suggestion (not sure if it is the most efficient way) for fixing the print area problem in the first sheet. Try adding the Do...Loop lines of this code where indicated.
<font face=Courier New> lr = Columns("B").Find(What:="*", After:=Range("B1"), SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
<SPAN style="color:#00007F">Do</SPAN> <SPAN style="color:#00007F">While</SPAN> Cells(lr, 2).Value = ""
lr = lr - 1
<SPAN style="color:#00007F">Loop</SPAN>
lb = 9</FONT>
For your new problem, try replacing this line
Code:
If Int(Val(Cells(r, 2).Value)) <> Int(Val(Cells(r - 1, 2).Value)) Then
with
Code:
If Int(Val(Cells(r, 10).Value)) <> Int(Val(Cells(r - 1, 10).Value)) Then
because column B = column 2 whereas column J = column 10. Also, if the values in column J are numbers, you should be able to use
Code:
If Int(Cells(r, 10).Value) <> Int(Cells(r - 1, 10).Value) Then
If you look back to my previous code for the first sheet, you will see that the Val() part of the code was removed.
I am going away for a week or so and not sure if I will have much internet access in that time. If your problem is not yet solved keep trying. Either somebody on the board will step in to help or if you try things yourself, you will probably figure it out anyway. Good luck!