Nice
Don Guillett SalesAid Software dguille...@gmail.com From: Sam Mathai Chacko Sent: Monday, February 06, 2012 2:06 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Need A Macro To Move Rows If your rows go in to the thousands, using autofilter will add a bit more (~40%) efficiency Sub Consolidator() Application.ScreenUpdating = 0 With Range("A2", Cells(Rows.Count, "J").End(xlUp)) .AutoFilter 7, "Pickup" .Offset(1, 10).Resize(.Rows.Count - 1, 10).SpecialCells(12).FormulaR1C1 = "=R[1]C[-10]" .Rows(1).Offset(, 10).FormulaR1C1 = "=RC[-10]" .AutoFilter With .Offset(, 10).Resize(, 10) .Value = .Value .Offset(, -10).Copy .PasteSpecial xlPasteFormats .Columns(1).SpecialCells(4).EntireRow.Delete End With End With Application.ScreenUpdating = 1 End Sub Regards, Sam Mathai Chacko On Mon, Feb 6, 2012 at 9:21 PM, dguillett1 <dguille...@gmail.com> wrote: Glad to help Don Guillett SalesAid Software dguille...@gmail.com From: John A. Smith Sent: Monday, February 06, 2012 9:11 AM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Need A Macro To Move Rows Thanks again for your assistance Don, your help is very much appreciated. John On Mon, Feb 6, 2012 at 10:03 AM, dguillett1 <dguille...@gmail.com> wrote: Place in a module and save the file as macro enabled. xls or .xlsM ‘========== Option Explicit Sub lineemupSAS() Dim i As Long Application.ScreenUpdating = False For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -2 Cells(i, 1).Resize(, 10).Copy Cells(i - 1, "K") Rows(i).Delete Next i Columns.AutoFit Application.ScreenUpdating = True End Sub ‘============= Don Guillett SalesAid Software dguille...@gmail.com From: John A. Smith Sent: Monday, February 06, 2012 8:21 AM To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ Need A Macro To Move Rows Thank you for your ongoing Excel help. I need a macro to correct a download issue. The download places one event on two lines in 10 columns. I need the second line of every event moved up next the first part of the event, thereby doubling the number of columns but cutting the number of rows in half. I have detailed an example in the attached file. Thank you again for all your help and teaching. John -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- Sam Mathai Chacko -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com