LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to sort through data


Hi all,

I was wandering if anyone can offer any advice on a problem.

Basically, in A:A I have a list of numbers. In B:B I have a list of
corresponding values. The values in B:B are always unique, but values
in A:A may be the same. Identical values will always appear together
(eg A1, A2, A3, etc).

I want to make a macro to sort through this data, and if A1=A2, copy B2
to C1. If A1=A3, copy B3 to A1.

Then move down the list in A:A until it finds the next value....and
repeat.

So in essence...where values in A:A are identical, column B:B is copied
and then transposed into the first cell containing the value.

If this does not make sense...the diagram below may help explain!

Original list -

A B
1 569
1 572
2 433
3 625
4 744
5 766
5 767
5 792

Sorted List -

A B C D
1 569 572
1 572
2 433
3 625
4 744
5 766 767 792
5 767
5 792

Thank you in advance for any advice!

Robert


--
systemx
------------------------------------------------------------------------
systemx's Profile: http://www.excelforum.com/member.php...o&userid=29254
View this thread: http://www.excelforum.com/showthread...hreadid=532528

 
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
Sort Data Macro rbrewer Excel Discussion (Misc queries) 2 April 18th 06 09:11 PM
Varying Data Sort Macro. MyKool Excel Programming 2 November 18th 05 04:17 PM
Using a MACRO to sort data BAM718 Excel Worksheet Functions 5 April 16th 05 01:40 PM
Using a macro to sort your data in alphabetical order? Carrie Excel Discussion (Misc queries) 1 April 14th 05 03:07 PM
data sort macro posborne[_7_] Excel Programming 0 January 13th 04 09:00 AM


All times are GMT +1. The time now is 04:31 AM.

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"