Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Moving data from column A to Columns B,C,D,E

Hi Michael:

This should do the job provided that the addresses are as specificed in
fixed blocks of 4 cells with a line between them.

Sub moveaddresses()

Dim lRow As Long

lRow = 1

With ActiveSheet
'get first row
Do While (.Cells(lRow, 1) = "")
lRow = lRow + 1
Loop
Do While (.Cells(lRow, 1) < "")
' could do in for loop but only 3 cells
.Cells(lRow, 2) = .Cells(lRow + 1, 1)
.Cells(lRow, 3) = .Cells(lRow + 2, 1)
.Cells(lRow, 4) = .Cells(lRow + 3, 1)
.Rows(lRow + 1 & ":" & lRow + 4).Delete
lRow = lRow + 1
Loop
End With
End Sub

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Michael P." wrote:

My data looks like this:

A. Rafanelli Winery
tel. +1 707.433.1385
4685 W. Dry Creek Road
Healdsburg, CA 95448

I want it to look like this:
A. Rafanelli Winery tel. +1 707.433.1385 4685 W. Dry Creek Road
Healdsburg, CA 95448
The data set is every four rows with a blank row inbetween is there a macro
out there for this other than copyPastespecialtranspose... A million times
over

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
moving several columns into 1 continuous column PattiP Excel Worksheet Functions 3 April 26th 09 06:05 PM
Moving data from row to columns gauche8715 New Users to Excel 2 November 8th 08 03:35 AM
Moving data between columns CW Excel Discussion (Misc queries) 7 July 24th 08 07:15 PM
Moving row data to columns in a one to many ovrdrvn Excel Programming 6 April 19th 06 07:48 PM
Moving data from 3 columns to next 3 macke Excel Programming 0 March 14th 06 03:54 PM


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