how can i create a macro to seperate lines by a uniqe value.e.g if i have
john doe for 10 lines and johnsmith for 20 lines, is there a macro to sperate
each unique value?
|
|
0
|
|
|
|
Reply
|
Utf
|
2/18/2010 7:20:01 PM |
|
Hi
Try something like this:
Sub InsertRow()
TargetCol = "A"
FirstRow = 2
LastRow = Range(TargetCol & 1).End(xlDown).Row
For rw = LastRow To FirstRow + 1 Step -1
If Range(TargetCol & rw) <> Range(TargetCol & rw - 1) Then
Rows(rw).EntireRow.Insert
End If
Next
End Sub
Regards,
Per
"Macro To Seperate Unique value"
<MacroToSeperateUniquevalue@discussions.microsoft.com> skrev i meddelelsen
news:6B364BCD-2D54-46F7-8B3B-D6C575201A77@microsoft.com...
> how can i create a macro to seperate lines by a uniqe value.e.g if i have
> john doe for 10 lines and johnsmith for 20 lines, is there a macro to
> sperate
> each unique value?
|
|
0
|
|
|
|
Reply
|
Per
|
2/18/2010 7:36:22 PM
|
|
See also your post from 4 minutes ago.
Not necessary to multi-post.
Wastes a lot of time and effort.
Gord Dibben MS Excel MVP
On Thu, 18 Feb 2010 11:20:01 -0800, Macro To Seperate Unique value
<MacroToSeperateUniquevalue@discussions.microsoft.com> wrote:
>how can i create a macro to seperate lines by a uniqe value.e.g if i have
>john doe for 10 lines and johnsmith for 20 lines, is there a macro to sperate
>each unique value?
|
|
0
|
|
|
|
Reply
|
Gord
|
2/18/2010 9:34:42 PM
|
|