LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Adding blank rows between groups of similar names

Public Sub ProcessData()
Const TEST_COLUMN As String = "A" '<=== change to suit
Dim i As Long
Dim iLastRow As Long

Application.ScreenUpdating = False

With ActiveSheet

iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = iLastRow To 2 Step -1
If .Cells(i, TEST_COLUMN).Value < .Cells(i - 1,
TEST_COLUMN).Value Then
.Rows(i).Insert
.Rows(i).Interior.ColorIndex = 38
End If
Next i

End With

Application.ScreenUpdating = True

End Sub




--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Justin" wrote in message
...
I have a spreadsheet that is about 1200 rows long. The first column
contains
names of funds, and the other columns contain different information about
them. To extremely simplify what I'm trying to do, take the following
list
for example.
A
A
B
B
B
C
D
D
This is what my first column looks like. I'd like to have Excel search
through and put blank rows between the dissimilar groups so that it looks
like the following
A
A

B
B
B

C

D
D
Any Ideas? This is going to take me a long time to do manually... and
then
I want to make those blank rows color too, but doing that manually isn't
quite as bad. Thanks All



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the MAX number while considering similar names Ninjapowa Excel Discussion (Misc queries) 3 November 4th 06 05:06 AM
Excel adding blank rows when sorting [email protected] Excel Discussion (Misc queries) 2 September 23rd 06 05:30 PM
Formula for adding up totals of groups koba Excel Discussion (Misc queries) 4 November 23rd 05 09:42 PM
SIMILAR NAMES IN A TABLE Dimitri Kryukov Excel Discussion (Misc queries) 5 June 28th 05 03:27 PM
Combine query to count products with similar names pomalley Excel Worksheet Functions 8 April 22nd 05 02:15 AM


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"