Receiving error 1004 - Method 'Rang' of object '_Global' failed

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.
 
B

Bob Phillips

Maybe just

Cells(row, NUM_OF_CELLS_TO_MOVE + 1).Select

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
T

Tim

Bob,

Thank you, that is exactly what I needed.

Bob Phillips said:
Maybe just

Cells(row, NUM_OF_CELLS_TO_MOVE + 1).Select

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top