Re: $$Excel-Macros$$ Macro to remove repeats and merge

2011-09-02 Thread NOORAIN ANSARI
Dear Gaetan, Please see attached sheet if it help to u... ** *Sub Remove_Duplcate_and_Merge() **Dim i, j As Integer Application.ScreenUpdating = False Application.DisplayAlerts = False For i = 1 To Sheet1.UsedRange.Rows.Count If Sheet1.Cells(i, 1).Value = Sheet1.Cells(i, 2).Value Then Sheet1.Range

RE: $$Excel-Macros$$ Macro to remove repeats and merge

2011-09-02 Thread Rajan_Verma
I think Remove duplicate is the Best option : -Original Message- From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Gaetan M Sent: Wednesday, August 31, 2011 6:00 PM To: MS EXCEL AND VBA MACROS Subject: Re: $$Excel-Macros$$ Macro to remove repeats and

Re: $$Excel-Macros$$ Macro to remove repeats and merge

2011-08-31 Thread dguillett1
3 AM To: MS EXCEL AND VBA MACROS Subject: Re: $$Excel-Macros$$ Macro to remove repeats and merge Thank you. The criteria is the column E (RNLO) On Aug 31, 7:50 am, "dguillett1" wrote: Not sure of your criteria but try this Option Explicit Sub getonlylastvaluecolB() Dim i As Long For

Re: $$Excel-Macros$$ Macro to remove repeats and merge

2011-08-31 Thread Gaetan M
Thank you. The criteria is the column E (RNLO) On Aug 31, 7:50 am, "dguillett1" wrote: > Not sure of your criteria but try this > > Option Explicit > Sub getonlylastvaluecolB() > Dim i As Long > For i = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1 > If Left(Cells(i + 1, 1), 4) = Left(Cells(i,

Re: $$Excel-Macros$$ Macro to remove repeats and merge

2011-08-31 Thread dguillett1
: $$Excel-Macros$$ Macro to remove repeats and merge ok thanks but I what i was wondering is if there is a possibility to run a macro to remove the prior line and combine them. I have a large amount of data and I need to compile it. So what i need to do is for everytime 2 or more items in column E

Re: $$Excel-Macros$$ Macro to remove repeats and merge

2011-08-31 Thread Gaetan M
ok thanks but I what i was wondering is if there is a possibility to run a macro to remove the prior line and combine them. I have a large amount of data and I need to compile it. So what i need to do is for everytime 2 or more items in column E are the same, they are merged and B2 takes the spot o

Re: $$Excel-Macros$$ Macro to remove repeats and merge

2011-08-31 Thread dguillett1
Not sure of your criteria but try this Option Explicit Sub getonlylastvaluecolB() Dim i As Long For i = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1 If Left(Cells(i + 1, 1), 4) = Left(Cells(i, 1), 4) Then Rows(i).Delete Next i End Sub -Original Message- From: Gaetan M Sent: Tuesday,

Re: $$Excel-Macros$$ Macro to remove repeats and merge

2011-08-31 Thread dguillett1
Not sure of your criteria but try this Option Explicit Sub getonlylastvaluecolB() Dim i As Long For i = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1 If Left(Cells(i + 1, 1), 4) = Left(Cells(i, 1), 4) Then Rows(i).Delete Next i End Sub === -Original Message- From: Gaetan M Sen

Re: $$Excel-Macros$$ Macro to remove repeats and merge

2011-08-30 Thread Venkat CV
Hi, You can try Remove duplicate's option in Excel 2007 or 2010 use ALT+A+T *Best Regards,* *Venkat * *Chennai* On Wed, Aug 31, 2011 at 2:44 AM, Gaetan M wrote: > I have the following: > > Column A B C D > E F > 12722 12722 51.