Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default macro - compare data in cols n transfer to next row

I have about 30 columns by about 5000 rows with data already sorted by column
S (Assy Code) . I need to compare that number ex 5000-01, from column D
(Assy Code - may be in the number format XXXX, XXXX-XX, XXX€¦€¦) with column S
ex 5000-01. If that number is equal then I need to check that the number
5000-01 from column S in that row is equal to the number 5000-01 in column S
in the row below. If yes select the row with Col S and cell= 5000-01 from
column A to column L cut it and paste it in the next row with Col S and cell=
5000-01. Then go to the row after that with the number ex 600-50-1 in Column
D and start all over again.. If it is not equal move to the next row.

Ex of original data:

A B C D E F G H I J K L €¦€¦.S
i. x 1 s 5000-01 €¦€¦......€¦€¦€¦€¦€¦ 50.......€¦.5000-01
ii. 5000-01
iii.p 4 b 600-50-1 55 600-50-1
iv.c 9 s 75-000-001 6 75-000-001
v. u 15 s 79-01 250 79-01
vi. 79-01
vii a 36 b 85 66 85

Expected data
A B C D E F G H I J K L €¦€¦.S
i. 5000-01
ii. x 1 s 500-01 €¦€¦€¦€¦€¦€¦€¦ .....50€¦€¦5000-01
iii.p 4 b 600-50-1 55 600-50-1
iv.c 9 s 75-000-001 6 75-000-001
v. 79-01
vi.u 15 s 79-01 250 79-01
vii a 36 b 85 66 85

Would appreciate your help.
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default macro - compare data in cols n transfer to next row

This can be done without much trouble, but I can't seem to understand exactly
what's going on with the way this this adjusts text. If you want to shoot me
some sample data I should be able to come up with something very quickly. You
can send it to take the x's out

"Johnny" wrote:

I have about 30 columns by about 5000 rows with data already sorted by column
S (Assy Code) . I need to compare that number ex 5000-01, from column D
(Assy Code - may be in the number format XXXX, XXXX-XX, XXX€¦€¦) with column S
ex 5000-01. If that number is equal then I need to check that the number
5000-01 from column S in that row is equal to the number 5000-01 in column S
in the row below. If yes select the row with Col S and cell= 5000-01 from
column A to column L cut it and paste it in the next row with Col S and cell=
5000-01. Then go to the row after that with the number ex 600-50-1 in Column
D and start all over again.. If it is not equal move to the next row.

Ex of original data:

A B C D E F G H I J K L €¦€¦.S
i. x 1 s 5000-01 €¦€¦......€¦€¦€¦€¦€¦ 50.......€¦.5000-01
ii. 5000-01
iii.p 4 b 600-50-1 55 600-50-1
iv.c 9 s 75-000-001 6 75-000-001
v. u 15 s 79-01 250 79-01
vi. 79-01
vii a 36 b 85 66 85

Expected data
A B C D E F G H I J K L €¦€¦.S
i. 5000-01
ii. x 1 s 500-01 €¦€¦€¦€¦€¦€¦€¦ .....50€¦€¦5000-01
iii.p 4 b 600-50-1 55 600-50-1
iv.c 9 s 75-000-001 6 75-000-001
v. 79-01
vi.u 15 s 79-01 250 79-01
vii a 36 b 85 66 85

Would appreciate your help.
Thanks

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
Compare & align 2 cols of Employee Names in sorted alpha order withVBA u473 Excel Discussion (Misc queries) 4 September 28th 08 05:43 PM
Range.Select 1st pass 13 cols, 2nd paqss 25 cols twice as wide in error? Craigm[_53_] Excel Programming 2 May 2nd 06 11:04 AM
How can you get a macro to work in transfer data from AS/400? Paul @ Carlisle Tire Excel Worksheet Functions 0 March 26th 06 11:53 PM
Cond Format:re color 2 cols, skip 2 cols Tat Excel Worksheet Functions 2 June 22nd 05 06:43 PM
Data transfer macro John Excel Programming 0 July 13th 04 09:00 AM


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