Hey!!

You will have to find the Last Column. You can use -

Dim LC as Integer

LC = Cells(2,Columns.Count).End(XLToLeft).Column
Then you can refer the Range using LC in place of Column References.

Thank You,

Deep