Creating a macro
Hi JC, what you should do is record your macro and then try to clean it up.
Simply turn on the recorder: Tools, MacroRecord New Macro and begin
manually doing what you want the macro to do. A toolbar will appear with the
Stop Recording button on it. When you have completed doing what you want in
the macro, click that button. You don't have to hurry, if you don't make any
input the recorder is just waiting on you. Test your macro to be sure it is
what you want, then post back to the NG for someone to help clean it up.
The one you posted is too ambiguous to determine exactly what you want to do.
"JC" wrote:
Hi guys/gals...
I'm NOT at all good with writing macros...in fact, i've never really written
one and i'm trying it out...i have a multiple command macro that i'm trying
to write below...can some one simplify it for me so i can get it to work...i
just want my people to push a button on my spreadsheet..I have everything set
up, but the macro code wont' work...
People will copy data from one sheet and paste it into my "macro" sheet and
then the macro will format it for them...i think it should be pretty simple!!
Thanks in advance!!!
~JC
Cells.Select
Selection.UnMerge
ActiveCell.Offset(0, 5).Columns("A:A").EntireColumn.Select
Selection.Copy
ActiveCell.Offset(0, 3).Columns("A:A").EntireColumn.Select
ActiveSheet.Paste
ActiveCell.Offset(0, -8).Columns("A:H").EntireColumn.Select
ActiveCell.Offset(0, -1).Range("A1").Activate
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ActiveCell.Offset(0, -7).Columns("A:A").EntireColumn.Select
ActiveSheet.Range("$A$1:$A$456").RemoveDuplicates Columns:=1, Header:=xlNo
ActiveCell.Rows("1:2").EntireRow.Select
Selection.Delete Shift:=xlUp
|