Hello tuke016,
Welcome to the Forum!
The following macro has been added to the attached workbook. There is button on "Sheet1" to run the macro. This will copy each row to worksheet "A+", "A", "B+", etc. depending on the value in column "M" of "Sheet1".
![]()
Sub CopyToSheetsByGrade() Dim DstWks As Worksheet Dim N As Long Dim R As Long Dim Rng As Range Dim Wks As Worksheet Set Rng = ActiveSheet.Range("A1").CurrentRegion For R = 1 To Rng.Rows.Count Set DstWks = Worksheets(Rng.Cells(R, "M").Text) N = DstWks.Cells(Rows.Count, "A").End(xlUp).Row If N = 1 Then If WorksheetFunction.CountA(DstWks.Range(Rng.Rows(1).Address)) > 0 Then N = N + 1 Else N = N + 1 End If DstWks.Rows(N).Resize(ColumnSize:=Rng.Columns.Count).Value = Rng.Rows(R).Value Next R End Sub











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks