View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brett Smith[_2_] Brett Smith[_2_] is offline
external usenet poster
 
Posts: 54
Default Need help with Macro in moving columns

I need help in creating a VBA macro in moving columns. I do know that the
following macro would cut and move column a to column b, but it would replace
column b with column a's information. So my question is, how do I move
column information around based on the header text for each column. So, if
column C has the text (Column A), I want the macro to move it to the first
column after looking in the first row to see that it says (Column A). Does
that make sense. And based on what other column header text information has,
be able to format it automatically without using my mouse or keyboard. So
the macro would move everything around all on it's own. How would I do this?

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 1/11/2006 by BSmith
'

'
Columns("A:A").Cut Destination:=Columns("B:B")
Columns("B:B").Select
End Sub