VBABEGINER
Well-known Member
- Joined
- Jun 15, 2011
- Messages
- 1,284
- Office Version
- 365
- Platform
- Windows
In my column B there are no. of records present and My all records started from b7.
In col B there are some codes whose naming convetions started from "IC".
this are located any where.
I want to put them (started them) from B7 only.
suppose, if records are 3 IC's code then it will automatically insert the rows from b7 and go to b8 , b9 and so on.
i coded following
can any one pls suggest me, how i can put them in proper format?
In col B there are some codes whose naming convetions started from "IC".
this are located any where.
I want to put them (started them) from B7 only.
suppose, if records are 3 IC's code then it will automatically insert the rows from b7 and go to b8 , b9 and so on.
i coded following
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim i As Long
Dim x As Integer, y As Integer
Application.ScreenUpdating = False
For x = 7 To Range("B7").End(xlDown).Row
For i = 8 To Range("B6").End(xlDown).Row
If Left(Cells(i, 2), 2) = "IC" Then
Selection.Cut
Cells(x, 2).Select
ActiveSheet.Paste
End If
Next
Next x
End Sub
can any one pls suggest me, how i can put them in proper format?