#1
|
||||
|
||||
Sorting or an Excel formula to insert a blank row after ending a series.
I have a file consisting so many part codes in a column.Most of the part codes are same.Now,I want when a particular part code end,a blank row should be insert and a new part code begin and so on.Is it possible through excel? Pl.refer attach file for more clarification. |
#2
|
|||
|
|||
Try this code:
Code:
Sub Macro2() Dim i As Integer With ActiveSheet For i = 2 To 25 Range("E" & i).Value = Range("B" & i).Value Next i End With With ActiveSheet For i = 2 To 25 If Range("E" & i + 1).Value > Range("E" & i).Value Then Range("E" & i + 1).Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove End If i = i + 1 Next i End With End Sub |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to capture start and ending Ref. Nos. in an array | KIM SOLIS | Excel | 5 | 09-07-2011 07:43 AM |
How to organize and insert blank cells between a huge number of data? | tareq | Excel | 12 | 09-29-2010 02:12 PM |
Add text to the beginning/ending of each line in word | ballmoney | Word | 1 | 01-17-2010 02:19 AM |
Sorting columns in Excel - please advise | Jonre | Excel | 2 | 08-21-2009 02:38 AM |
How to turn all blank lines into non-blank for legal forms | sieler | Word | 3 | 04-12-2009 01:38 PM |