Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Ken,
Thanks for your quick response. It worked like a charm. Regards, Evan R "Ken Hudson" wrote: Hi EJR, Try the following code. Be sure to make a copy of your workbook first! After moving the duplicate names, the code will delete the extra row. Post back if you need to have this modified or if you need help setting up the macro. Option Explicit Dim Iloop As Double Dim RowCount As Double Sub MoveDupes() 'Turn off warnings, etc. Application.ScreenUpdating = False Application.DisplayAlerts = False RowCount = Cells(Rows.Count, "A").End(xlUp).Row For Iloop = RowCount To 2 Step -1 If Cells(Iloop, "A") = Cells(Iloop - 1, "A") Then Cells(Iloop - 1, "E") = Cells(Iloop, "B") Cells(Iloop - 1, "F") = Cells(Iloop, "C") Cells(Iloop - 1, "G") = Cells(Iloop, "D") Rows(Iloop).Delete End If Next Iloop 'Turn on warnings, etc. Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub -- Ken Hudson "EJR" wrote: I have columnar data in the four headings below; A B C D Loan Number / Taxpayer ID Number / Customer Name / SCR21 It is possible that there is information for two customer four each loan. Is there a way for my to compare the values in the "Loan Number" column in rows 3 and 2, and if it matches the cell above, copy the contents for columns B, C & D and paste the to Columns E, F & G in row # 2? Thanks for any help, EJR |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Marking duplicate entries based on multiple columns | Excel Discussion (Misc queries) | |||
find duplicate based on two columns | Excel Discussion (Misc queries) | |||
Automatically Duplicate Rows based on Volume. | Excel Worksheet Functions | |||
Duplicate rows, based on date difference | Excel Programming | |||
Duplicate rows based on date difference | Excel Programming |