PDA

View Full Version : Solved: How to add a text column to a dynamic range using a macro



bananatang
07-27-2009, 02:57 AM
HI,

Need some help on this one please.

i need a macro that will insert the text "Off Roll" in column AA, Row 2 and all the way down to the last row inline with Column A.

Column A contains a unique no. that will alway be populated, so i would like to use this column to identify the last row.

Thanks

BT

Bob Phillips
07-27-2009, 03:39 AM
LastRow = Range("A1").End(xlDown).Row
Range("AA2").Resize(LastRow-1).Value = "Off Roll"

mdmackillop
07-27-2009, 04:55 AM
or

Range(Cells(2, 1), Cells(2, 1).End(xlDown)).Offset(, 26).Value = "Off Roll"

bananatang
07-27-2009, 05:59 AM
Xld and mdmackillop that you both for your reply and vba code. Both work well.

Thanks very much.

BT