ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cut & Paste Loop (https://www.excelbanter.com/excel-programming/290125-cut-paste-loop.html)

Allan[_5_]

Cut & Paste Loop
 
I am just learning about Excel VBA on a project.
I have a very long spreadsheet of data to format from one column.

How would I automate the following?

"Search for a phone number, cut whole cell, paste it up two rows and over 3
columns.
Find next phone number... repeat..."


I will also be using this to move addresses...

"Search for address containing this string, cut whole Cell, paste up 1 row,
and over 6.
Find next Address."

Thanks in advance

============================
Allan



Don Guillett[_4_]

Cut & Paste Loop
 
this should give you the idea
Sub moveover()' moves over 3 columns & up 2 rows
For Each c In Selection
c.Cut c.Offset(-2, 3)
Next
End Sub

--
Don Guillett
SalesAid Software

"Allan" wrote in message
news:qpSTb.386293$JQ1.37622@pd7tw1no...
I am just learning about Excel VBA on a project.
I have a very long spreadsheet of data to format from one column.

How would I automate the following?

"Search for a phone number, cut whole cell, paste it up two rows and over

3
columns.
Find next phone number... repeat..."


I will also be using this to move addresses...

"Search for address containing this string, cut whole Cell, paste up 1

row,
and over 6.
Find next Address."

Thanks in advance

============================
Allan






All times are GMT +1. The time now is 12:00 AM.

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