T
Tim
I am receiving error 1004 - Method 'Rang' of object '_Global' failed when
trying to select a single cell via Range.Select.
What is being done is cutting a range of cells and pasting to another place
of the same sheet.
Here is the line that I receive the error:
Range(Cells(row, NUM_OF_CELLS_TO_MOVE + 1)).Select.
Here is a copy of the code:
For row = 2 To lastRow
If currentStudentNumber <> Cells(row, STUDENT_NUMBER_COL) Then
currentStudentNumber = Cells(row, STUDENT_NUMBER_COL).Value
currentStudent = row
sectionCount = 0
End If
If sectionCount <> 0 Then
Range(Cells(row, TERM1COL), Cells(row, TERM1COL +
NUM_OF_CELLS_TO_MOVE)).Select
Selection.Cut
Range(Cells(row, NUM_OF_CELLS_TO_MOVE + 1)).Select
ActiveSheet.Paste
End If
sectionCount = sectionCount + 1
Next row
Thank you for any help.
trying to select a single cell via Range.Select.
What is being done is cutting a range of cells and pasting to another place
of the same sheet.
Here is the line that I receive the error:
Range(Cells(row, NUM_OF_CELLS_TO_MOVE + 1)).Select.
Here is a copy of the code:
For row = 2 To lastRow
If currentStudentNumber <> Cells(row, STUDENT_NUMBER_COL) Then
currentStudentNumber = Cells(row, STUDENT_NUMBER_COL).Value
currentStudent = row
sectionCount = 0
End If
If sectionCount <> 0 Then
Range(Cells(row, TERM1COL), Cells(row, TERM1COL +
NUM_OF_CELLS_TO_MOVE)).Select
Selection.Cut
Range(Cells(row, NUM_OF_CELLS_TO_MOVE + 1)).Select
ActiveSheet.Paste
End If
sectionCount = sectionCount + 1
Next row
Thank you for any help.