Try using this Macro/routine by changing the word "Test" to whatever the
final row data in column A always is...
Sub PrintRange()
Dim c As Range
For Each c In Range(Range("A1"), Range("A65536").End(xlUp))
If c.Value = "Test" Then
Range("A1", c.Offset(0, 0).Address).Name = "Print_Area"
Exit For
End If
Next
End Sub
"eagles1994" wrote:
I have a worksheet that when an existing macro is run on selected criteria
the data may contain a differing numbers of rows, eg data may finish at row
90 or row 100. The final row always contains the same data in column A.
How can I set the print area to be aligned with the final row?
Cheers
|