Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving columns with formulas gives #REF! Miss Kitty[_2_] Excel Worksheet Functions 0 August 20th 08 03:12 PM
Moving Columns egrave Excel Discussion (Misc queries) 1 July 6th 08 11:09 PM
Moving Columns in a Pivot Wanna Learn Excel Discussion (Misc queries) 4 November 8th 07 09:00 AM
Moving Columns only hyyfte[_16_] Excel Programming 0 September 22nd 04 04:03 PM
Moving Columns gminor7 Excel Programming 2 September 12th 03 03:27 PM


All times are GMT +1. The time now is 04:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"