Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
LisaJ27
 
Posts: n/a
Default Combining second row to first row

How do I make this:

John Edwards
24 Main St NY NY 08000
(all data is in seperate cells)

Look like this:

John Edwards 24 Main St NY, NY 08000
(Each cell moved to top line)

There are multiple rows of this data. Thanks

  #2   Report Post  
Don Guillett
 
Posts: n/a
Default Combining second row to first row

try this

Sub moverow()
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -2
Range(Cells(i, 1), Cells(i, 10)).Copy Cells(i - 1, 2)
Rows(i).Delete
Next
End Sub

--
Don Guillett
SalesAid Software

"LisaJ27" wrote in message
...
How do I make this:

John Edwards
24 Main St NY NY 08000
(all data is in seperate cells)

Look like this:

John Edwards 24 Main St NY, NY 08000
(Each cell moved to top line)

There are multiple rows of this data. Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
Liz Liz is offline
external usenet poster
 
Posts: 133
Default Combining second row to first row

The macro below works well however it deletes out some of the data I need in
other columns. What do I need to do to the macro to adjust? Thanks!

"Don Guillett" wrote:

try this

Sub moverow()
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -2
Range(Cells(i, 1), Cells(i, 10)).Copy Cells(i - 1, 2)
Rows(i).Delete
Next
End Sub

--
Don Guillett
SalesAid Software

"LisaJ27" wrote in message
...
How do I make this:

John Edwards
24 Main St NY NY 08000
(all data is in seperate cells)

Look like this:

John Edwards 24 Main St NY, NY 08000
(Each cell moved to top line)

There are multiple rows of this data. 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
Combining mutiple columns into one column noelcantona Excel Worksheet Functions 1 October 16th 05 06:18 PM
combining countif with AND function Daesthai Excel Worksheet Functions 3 October 13th 05 05:37 AM
Combining text from multiple columns into 1 stelee Excel Discussion (Misc queries) 3 July 6th 05 11:04 AM
Combining workbooks with some variable field names Bob Dobalina Excel Discussion (Misc queries) 8 May 17th 05 09:48 PM
Combining Tables metrueblood Excel Discussion (Misc queries) 3 February 2nd 05 10:05 PM


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