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 |
All times are GMT +1. The time now is 12:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com