Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Q: Creating a macro to sort and group columns in a sheet according to another sheet

Hello group.

I have predefined a sheet that has a lot of grouping of columns like
this:

|"A"|"B"|group_1_name|"D"|"E"|"F"|group_2_name|"G" |"H"|"I"|group_3_name|

Group 1 has the columns with the elements "A" & "B"
Group 2 has the columns with the elements "D","E" & "F".
Group 3 has the columns with the elements "G","H" & "I"

This means that if the groups are closed the sheet will look like this:

|group_1_name|group_2_name|groups_3_name|

Now i have a sheet with the top column elements like this:

|"B"|"I"|"D"|"F"|"G"|

then I what my macro to sort and group the columns to the following
result:

|"B"|group_1_name|"D"|"F"|group_2_name|"G"|"I"|gro up_3_name|

Where Group 1 has element "B" , Group 2 has elements "D" & "F" and
Group 3 has elements "G" and "I".

My guess is that key steps in the macro could be:
Step 1: Sort columns like predefined sheet
Step 2: Group columns like predefined sheet
Step 3: Insert group_?_name column

Does anyone have some hints on how I'll get started on this problem?

Any help is greatly appreciated. Let me know if my question is unclear.

Regards,

Mb

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
Using a macro how do I group every sheet within a book? Pank Mehta Excel Discussion (Misc queries) 3 March 17th 05 07:44 PM
cannot group columns - get "cannot shift objects off sheet" help! centurion Excel Worksheet Functions 1 March 7th 05 01:11 PM
cannot group columns - get "cannot shift objects off sheet" help! jeff Excel Worksheet Functions 0 March 7th 05 10:47 AM
vba to sort group copy paste to another sheet tango Excel Programming 1 November 5th 04 09:08 AM
vba to sort group copy paste to another sheet mango Excel Worksheet Functions 0 November 5th 04 05:27 AM


All times are GMT +1. The time now is 12:58 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"