PC Review


Reply
Thread Tools Rate Thread

creating macro to seperate lines

 
 
Macro To Seperate Unique value
Guest
Posts: n/a
 
      18th Feb 2010
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 rows, is there a macro to sperate
each unique value?
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      18th Feb 2010
Sub InsertRow_At_Change()
'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
End Sub


Gord Dibben MS Excel MVP

On Thu, 18 Feb 2010 11:16:07 -0800, Macro To Seperate Unique value <Macro To
Seperate Unique (E-Mail Removed)> 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 rows, is there a macro to sperate
>each unique value?


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
seperate first 2 lines of column in seperate columns in same row =?Utf-8?B?R2x5bm5oYW1lcg==?= Microsoft Excel Misc 2 9th Oct 2006 04:23 AM
DLookup Seperate Lines DS Microsoft Access Form Coding 2 24th Jul 2006 03:04 PM
Paragraph on seperate lines CJ Microsoft Outlook 0 27th Apr 2005 10:05 PM
How to draw lines to seperate data garrylwhiting Microsoft Excel Programming 1 8th Nov 2004 11:20 PM
Creating blank lines in a form with labels underneath lines =?Utf-8?B?RG9ubmE=?= Microsoft Word Document Management 1 5th Dec 2003 04:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:16 AM.