From: Macro To Seperate Unique value on
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?
From: Per Jessen on
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(a)discussions.microsoft.com> skrev i meddelelsen
news:6B364BCD-2D54-46F7-8B3B-D6C575201A77(a)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?

From: Gord Dibben on
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(a)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?