ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Repeat a recorded macro (https://www.excelbanter.com/excel-discussion-misc-queries/152223-repeat-recorded-macro.html)

Puzzled

Repeat a recorded macro
 
I am formulating an address list that I will ultimetely print address labels
from. I am forced to cut and paste this data from a online table. I paste
it into excel in the format below which represents just 2 records. Excell
provides me with the ability to massage this date thhrough a recorded macro
and bring the various rows into 1 row with several coloums. I can
sucessfully do this, however I want to automatically repeat this process
though 1500 records. How do I cause this macro to repeat from a conststant
starting point, that will execute this macro repeatetly.???

Smith1, KIMBERLY JUNE SL617162 Current, Inactive
Sales Associate 3/31/2008
413 NE 12 AVE POMPANO BEACH, FL 33060
Smith 2, SANDRA D SL3175798 Current, Inactive
Sales Associate 3/31/2008
2011 W ATLANTIC BLVD APT 308 POMPANO BEACH, FL 33069

Your help would be greatly appreciated!


Dave O

Repeat a recorded macro
 
On another topic, did you ask Kim and Sandra if you could post their
full names and addresses and what appears to be an employee number to
the internet?


Puzzled

Repeat a recorded macro
 
Dave,

I obviously changed their names to Smith. But ,thanks for your concern.

"Dave O" wrote:

On another topic, did you ask Kim and Sandra if you could post their
full names and addresses and what appears to be an employee number to
the internet?



Don Guillett

Repeat a recorded macro
 
Is it always Pompano Beach?
What do you want your final result to look like for the two examples?
Maybe like this. It could be further refined.

Kimberly June Smith1
413 Ne 12 Ave
Pompano Beach, Fl 33060
Sandra D Smithwick 2
2011 W Atlantic Blvd Apt 308
Pompano Beach, Fl 33069


Sub doaddress()
On Error Resume Next
For i = 1 To 6 Step 3
p1 = InStr(Cells(i, 1), "SL")
s1 = Left(Cells(i, 1), p1)
p2 = InStr(s1, ",") + 1
s2 = Application.Proper(Mid(Cells(i, 1), p2, p1 - p2))
s3 = s2 & Left(Cells(i, 1), p2 - 2)
p3 = InStr(Cells(i + 2, 1), "POMPANO") - 1
dlr = Cells(Rows.Count, "b").End(xlUp).Row + 1
Cells(dlr, 2) = s3
Cells(dlr + 1, 2) = Application.Proper(Left(Cells(i + 2, 1), p3))
Cells(dlr + 2, 2) = Application.Proper(Right(Cells(i + 2, 1), _
Len(Cells(i + 2, 1)) - p3))
Next
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Puzzled" wrote in message
...
I am formulating an address list that I will ultimetely print address
labels
from. I am forced to cut and paste this data from a online table. I
paste
it into excel in the format below which represents just 2 records. Excell
provides me with the ability to massage this date thhrough a recorded
macro
and bring the various rows into 1 row with several coloums. I can
sucessfully do this, however I want to automatically repeat this process
though 1500 records. How do I cause this macro to repeat from a
conststant
starting point, that will execute this macro repeatetly.???

Smith1, KIMBERLY JUNE SL617162 Current, Inactive
Sales Associate 3/31/2008
413 NE 12 AVE POMPANO BEACH, FL 33060
Smith 2, SANDRA D SL3175798 Current, Inactive
Sales Associate 3/31/2008
2011 W ATLANTIC BLVD APT 308 POMPANO BEACH, FL 33069

Your help would be greatly appreciated!




All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com