Need help in how to delete certain data

donkey

Board Regular
Joined
Jan 20, 2007
Messages
133
I have a workbook which starts with data in column B. The heading of each set of data starts with Turn No. What im trying to do is to be able to delete that row and the following 2 lines under it. It will then show LTP in column B. What I need doing with that is to be cut and pasted into column A.

This is how it looks at moment.
Book1
ABCDEFGHI
1TurnNoLoco/ActiTrainWorkingTrainCrossDays
2UnitvityArrDepIdRteRefs
3-----------------------------------------------------------------------------------------
4LTPBY1751
Sheet1


And I need it to look like this
Book1
ABCDEF
1
2
3
4LTPBY1751
Sheet1


Can anyone help. I also need it to carry on doing it right the way down the page.

Many Thanks
 
I think were getting the wrong end of the forum. What ive got now is the LTP BYXX in row B and what im want to do now is everytime it appears I need it copied to the adjcent cell in row A.
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Does this not do it then?

Code:
Sub move_stuff() 

Dim myRange As Range 

For Each myRange In Range([B1], [B65536].End(xlUp)) 

If InStr(1, myRange.Value, "LTP BY") = 1 Then 

 myRange.Offset(0, -1) = myRange.Value 
  

End If 
  
Next myRange 

End Sub

Dom
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,407
Members
449,448
Latest member
Andrew Slatter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top