Link to home
Start Free TrialLog in
Avatar of Patrick O'Dea
Patrick O'DeaFlag for Ireland

asked on

Macro - Paste Special using indirect? Excel VBA

See code below.

Columns("B:B").Select

I do NOT want to Select Column "B" specifically.

I actually want to Specify the column that is indicated by the contents of cell A10.

So, for example, if A10 contains "X" then I want: Columns("X:X").Select
So, for example, if A10 contains "Z" then I want: Columns("Z:Z").Select


How do I do this?

Thanks,

Sub Macro2()
'
' Macro2 Macro
'
    Columns("B:B").Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
...
...
...

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of FernandoFernandes
FernandoFernandes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Patrick O'Dea

ASKER

Thanks, perfect