Excel macro -example

  • Thread starter Thread starter Yanchri Gerber
  • Start date Start date
Y

Yanchri Gerber

Where can i view the code of an example of a macro that rearranges columns
in excel ?

Thanks in advance
Yanchri
 
Hi

Record one using the macro recorder ... tools / macro / record new macro
to view the code tools / macro / macros, click on the one you created and
choose edit

Regards
julieD
 
Maybe i'm misreading something.
But what i actually want is an example of a macro, already created.
Then i want to view the code.

Thanks
Yanchri
 
Hi

if you record one then you will be able see the code (and make some sense of
it as you'll know what you did to cause the code to be written the way it
is) .. other than that maybe someone else will be able to provide this for
you.

Regards
JulieD
 
Sub MoveColumn()
' moved column E before Column B
Dim rng As Range
Set rng = Columns(5)
rng.Cut
Columns(2).Insert
End Sub
 
Back
Top