Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Sorting Data Colums

Hi,

I am trying to merge data from rows into 1.

4195-0000 10046000932 10 The Street, Any Town, Big City, PC1
2PC 08 11/04/2005


Carcass CARCASS - Fire Open FLAVEL WELCOME G/F - UnitHtr R/S BAXI
BRAZILIA2 SLIMLINE - UnitHtr R/S MAXOL MONTANA 1500

6290-0001 10046000665 119 The Street, Any Town, Big City, PC1
2PC 08 13/04/2005


Carcass CARCASS

4314-0000 10046000924 12 The Street, Any Town, Big City, PC1
2PC 08 12/04/2005


Carcass CARCASS

4403-0000 10046000711 127 The Street, Any Town, Big City, PC1
2PC 08 13/04/2005

I am wanting to take the line that starts with Carcass and put it at the end
of the line with the address.

Please help and let me know how its possible??

Much appreciated,

Jez.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Sorting Data Colums

Jez,
Try this which assumes lines are "paired" i.e last row is a
"Carcass" row. Carcass rows are deleted after adding to previous row ... so
test first!

Change ranges to suit as I have had to interpret what is in each column.

Sub a()
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For r = lastrow To 2 Step -2
'add columns A to C (of "Carcass") to end of previous row (assumed to be
column F)
Range("a" & r & ":c" & r).Copy Range("G" & r - 1)
Rows(r).Delete ' Delete Carcass row
Next r
End Sub


HTH

"Jez" wrote:

Hi,

I am trying to merge data from rows into 1.

4195-0000 10046000932 10 The Street, Any Town, Big City, PC1
2PC 08 11/04/2005


Carcass CARCASS - Fire Open FLAVEL WELCOME G/F - UnitHtr R/S BAXI
BRAZILIA2 SLIMLINE - UnitHtr R/S MAXOL MONTANA 1500

6290-0001 10046000665 119 The Street, Any Town, Big City, PC1
2PC 08 13/04/2005


Carcass CARCASS

4314-0000 10046000924 12 The Street, Any Town, Big City, PC1
2PC 08 12/04/2005


Carcass CARCASS

4403-0000 10046000711 127 The Street, Any Town, Big City, PC1
2PC 08 13/04/2005

I am wanting to take the line that starts with Carcass and put it at the end
of the line with the address.

Please help and let me know how its possible??

Much appreciated,

Jez.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Sorting Data Colums

Toppers, Thanks for that.

I am still struggling with this.

This below is how it set out in Excel. I am wanting to take the information
which in the first set of data is in Cell A4 and move up 3 rows and paste in
to what would be in Column I but for this case it would be Cell I1. This
would carry on down the page till I reach around row 2000, also the problem
is that it may not be 2 blank rows between address and carcass row. This is
changeable

(Cell A1)4195-0000 (Cell C1)10046000932(Cell D1)10 The Street, Any Town,
Big City, PC1 2PC (Cell G1)08(Cell H1)11/04/2005

(Cell A4)Carcass CARCASS - Fire Open FLAVEL WELCOME G/F - UnitHtr
R/S BAXIBRAZILIA2 SLIMLINE - UnitHtr R/S MAXOL MONTANA 1500

I hope this is easier to explain what I am doing. I am taring my hair out
with it now :-)

If its easier I could email a example file for you to look at. please let me
know.

Thanks,
Jez


"Toppers" wrote:

Jez,
Try this which assumes lines are "paired" i.e last row is a
"Carcass" row. Carcass rows are deleted after adding to previous row ... so
test first!

Change ranges to suit as I have had to interpret what is in each column.

Sub a()
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For r = lastrow To 2 Step -2
'add columns A to C (of "Carcass") to end of previous row (assumed to be
column F)
Range("a" & r & ":c" & r).Copy Range("G" & r - 1)
Rows(r).Delete ' Delete Carcass row
Next r
End Sub


HTH

"Jez" wrote:

Hi,

I am trying to merge data from rows into 1.

4195-0000 10046000932 10 The Street, Any Town, Big City, PC1
2PC 08 11/04/2005


Carcass CARCASS - Fire Open FLAVEL WELCOME G/F - UnitHtr R/S BAXI
BRAZILIA2 SLIMLINE - UnitHtr R/S MAXOL MONTANA 1500

6290-0001 10046000665 119 The Street, Any Town, Big City, PC1
2PC 08 13/04/2005


Carcass CARCASS

4314-0000 10046000924 12 The Street, Any Town, Big City, PC1
2PC 08 12/04/2005


Carcass CARCASS

4403-0000 10046000711 127 The Street, Any Town, Big City, PC1
2PC 08 13/04/2005

I am wanting to take the line that starts with Carcass and put it at the end
of the line with the address.

Please help and let me know how its possible??

Much appreciated,

Jez.

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
Sorting multiple colums ??? Drew Leyda New Users to Excel 1 August 17th 09 05:31 PM
Sorting 2 colums to get numbers to match ? thriller Excel Worksheet Functions 2 December 12th 07 11:13 AM
sorting 2 colums of numbers and incremening them down blk&wht Excel Discussion (Misc queries) 10 October 9th 06 10:12 PM
Sorting Colums Kate000 Excel Worksheet Functions 2 April 4th 06 05:50 AM
Sorting colums Kate000 Excel Discussion (Misc queries) 3 April 4th 06 02:38 AM


All times are GMT +1. The time now is 06:54 AM.

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

About Us

"It's about Microsoft Excel"