Hi all,
It is the very first time I work with VBA and I am struggling quite a bit.
I have an Excel sheet in wich I have to insert a number of columns equal to a value in a cell. Note that the value in this cell will change over time. As a result, it is always the same cell that I would like to refer to. I have created a simple macro that inserts one single column in order to see the basic code. Unfortunately, I am unable to adjust it to arrive at the desired result.
Can anyone help me out?
Thanks
_________________
Sub Macro1()
'
' Macro1 Macro
'
'
Columns("C:C").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub
It is the very first time I work with VBA and I am struggling quite a bit.
I have an Excel sheet in wich I have to insert a number of columns equal to a value in a cell. Note that the value in this cell will change over time. As a result, it is always the same cell that I would like to refer to. I have created a simple macro that inserts one single column in order to see the basic code. Unfortunately, I am unable to adjust it to arrive at the desired result.
Can anyone help me out?
Thanks
_________________
Sub Macro1()
'
' Macro1 Macro
'
'
Columns("C:C").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub