I forgot to sort the columns : Sub test2() Dim Col As Integer, c As Range, Line As Long Dim inCalculationMode As Integer Application.ScreenUpdating = False inCalculationMode = Application.Calculation Application.Calculation = xlCalculationManual Col = Cells(1, Columns.Count).End(xlToLeft).Column Line = Cells(Cells.Rows.Count, 1).End(xlUp).Row + 1 Set rg = Range(Cells(1, 1), Cells(Cells.Rows.Count, 1).End(xlUp)) rg.Sort key1:=rg(1, 1), order1:=xlAscending For i = 2 To Col Set rg = Range(Cells(1, i), Cells(Cells.Rows.Count, i).End(xlUp)) rg.Sort key1:=rg(1, 1), order1:=xlAscending rg.Copy Cells(Line, 1) Line = Cells(Cells.Rows.Count, 1).End(xlUp).Row + 1 Next i Application.Calculation = inCalculationMode Application.ScreenUpdating = True End Sub
Daniel -----Message d'origine----- De : excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com] De la part de Financeguy Envoyé : dimanche 26 décembre 2010 00:30 À : MS EXCEL AND VBA MACROS Objet : $$Excel-Macros$$ Cut and Paste Multiple Column Range Data into One Column Hi, I'm trying to select one range at a time for each individual column within a single worksheet. I have range data in approximately 150 columns on the worksheet that I would like to sort individually (ascending order), then cut, and finally paste into the last row of Column A. For example, if I had data on a sheet, like A1:A13000, B1:B1453, C1:C1232.......and so on... till say CC1:CC1535....I'd like to cut each range....B1:B14535, and paste it below A13000.....and so on.. It is cumbersome to do it manually, and I would love some VBA code that could help me with accomplish this..... Many thanks in advance, Finance guy -- ---------------------------------------------------------------------------- ------ Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts