How can I use this code but tell it to select all but the right-most column?
Why?
I have this piece of code...
Set Rng = Range("A2")
Set RngEnd = Cells(Rows.Count, Rng.Column).End(xlUp)
Set Rng = IIf(RngEnd.Row < Rng.Row, Rng, Range(Rng, RngEnd))
Range("L2") = Rng.Rows.Count
which puts the results in L2.
The code below must come after the code above. So If I leave it as is, the code below then selects column L as part of the print area, which I don't want.
ActiveSheet.PageSetup.PrintArea = [A1].CurrentRegion.Address
Thanks much
Bookmarks