![]() |
#4
|
|||
|
|||
![]()
Sub CopyList()
Application.ScreenUpdating = False Application.DisplayAlerts = False Sheet1.Activate Dim ListRange As Range Set ListRange = Range("B3", Range("B3").End(xlDown)) ListRange.Cells(1, 1).Select Dim i As Long Do While ActiveCell <> "" i = WorksheetFunction.CountIf(ListRange, ActiveCell.Value) Range(ActiveCell, ActiveCell.Offset(i - 1, -1)).Copy ActiveCell.Offset(i, 0).Select Sheets.Add after:=Sheets(Worksheets.Count) ActiveCell.PasteSpecial On Error Resume Next ActiveSheet.Name = Cells(1, 2).Value Selection.EntireColumn.AutoFit Sheet1.Activate Loop Range("A1").Select Application.ScreenUpdating = True Application.DisplayAlerts = True End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
If column B cell is a certain value then copy and paste the value to column A | Snaybot | Excel Programming | 1 | 12-01-2015 07:10 PM |
Copy column 1 data into Column 3 | ShailShin | Word VBA | 1 | 06-18-2015 10:49 AM |
Excel copy two numbers between specific column and paste in next sheet | visha_1984 | Excel | 1 | 12-26-2014 07:59 PM |
how can i split a column of rows in half without copy and paste.. | Lindseyfparker | Excel | 2 | 04-25-2014 12:52 AM |
![]() |
konopca | Word VBA | 5 | 02-20-2014 02:34 PM |