Hi,
I've got a number of column groups that I want to perform various actions on. I've taken parameters to get these groups as follows...
What I now want to do is select the whole columns in say group2.
I can't work out how I select the whole column using these defined column numbers though. Would anyone be able to point me in teh right direction?
Many thanks
I've got a number of column groups that I want to perform various actions on. I've taken parameters to get these groups as follows...
Code:
Sub Get_Column_Groups()
'Row titles
Range("A1").Select
Col_Group1_From = ActiveCell.Column
Col_Group1_To = ActiveCell.Column
Col_Group1_Width = Col_Group1_To - Col_Group1_From + 1
'Months
Col_Group2_From = ActiveCell.Offset(0, 1).Column
Col_Group2_To = Selection.End(xlToRight).Offset(0, -9).Column
Col_Group2_Width = Col_Group2_To - Col_Group2_From + 1
'Blank
Col_Group3_From = Selection.End(xlToRight).Offset(0, -8).Column
Col_Group3_To = Selection.End(xlToRight).Offset(0, -8).Column
Col_Group3_Width = Col_Group3_To - Col_Group3_From + 1
'Monthly Movement
Col_Group4_From = Selection.End(xlToRight).Offset(0, -7).Column
Col_Group4_To = Selection.End(xlToRight).Offset(0, -7).Column
Col_Group4_Width = Col_Group4_To - Col_Group4_From + 1
End Sub
What I now want to do is select the whole columns in say group2.
I can't work out how I select the whole column using these defined column numbers though. Would anyone be able to point me in teh right direction?
Many thanks