Hi all,
I try to select a variable range of cells in a column, in order to set a standard lay-out (background, borders, etc.).
This code does the job allright:
VBA Code:
Range("A3:D999,E3:P999,Q3:Q999,R3:T999,U3:U999,V3:V999,W3:AH999").Select
However, if the data in the column doesn't reach up to row 999, why select that deep? Is there a possibility to select only rows with data in them. Something like this:
VBA Code:
Range("D3", Selection.End(xlDown)).Style = "Percent"
This works fine, too. Can both lines be somehow combined?
Thanks for responses!!
Patrick.
I try to select a variable range of cells in a column, in order to set a standard lay-out (background, borders, etc.).
This code does the job allright:
VBA Code:
Range("A3:D999,E3:P999,Q3:Q999,R3:T999,U3:U999,V3:V999,W3:AH999").Select
However, if the data in the column doesn't reach up to row 999, why select that deep? Is there a possibility to select only rows with data in them. Something like this:
VBA Code:
Range("D3", Selection.End(xlDown)).Style = "Percent"
This works fine, too. Can both lines be somehow combined?
Thanks for responses!!
Patrick.