Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with Macro in moving columns
Anybody got an answer to my question?
"Brett Smith" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving columns with formulas gives #REF! | Excel Worksheet Functions | |||
Moving Columns | Excel Discussion (Misc queries) | |||
Moving Columns in a Pivot | Excel Discussion (Misc queries) | |||
Moving Columns only | Excel Programming | |||
Moving Columns | Excel Programming |