Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Some on this board wrote a macro for me to insert a blank row after a column
of names and it works wonderfully for last names. However if doesn't put a blank row between people with the same last name, but different first names. Is it possible for someone to look at this macro and change it for me? Thanks, I'll be very grateful. 'Sandy Mann July 1st, 2007 Dim LastRow As Long Dim X As Long LastRow = Cells(Rows.Count, 1).End(xlUp).Row Application.ScreenUpdating = False For X = LastRow To 3 Step -1 If Cells(X, 1).Value < Cells(X - 1, 1).Value Then If Cells(X, 1).Value < "" Then If Cells(X - 1, 1).Value < "" Then Cells(X, 1).EntireRow.Insert Shift:=xlDown End If End If End If Next X Application.ScreenUpdating = True |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro that will change the font of a cell if i change a value | Excel Discussion (Misc queries) | |||
Insert a day on change of other cell | Excel Worksheet Functions | |||
Insert lines at each change in value | Excel Discussion (Misc queries) | |||
I can't add a row How can I change it to let me insert a row | Excel Discussion (Misc queries) | |||
How do I change the default color of the tag for insert c... | Excel Discussion (Misc queries) |