Hi, please see the following code in VBA
Dim Num_Parts As Integer
Sheets("Sheet1").Activate
Num_Parts = Cells(5, 2)
Worksheets("Sheet2").Activate
For i = 2 To Num_Parts + 1
Cells(i, 8) = Cells(i, 6) * Cells(i, 3)
Cells(i, 9) = Cells(i, 7) * Cells(i, 3)
Cells(i, 10) = Cells(i, 8) + Cells(i, 9)
Cells(i, 11) = Cells(i, 8) / (24 * 3600)
Cells(i, 12) = Cells(i, 9) / (24 * 3600)
Cells(i, 13) = Cells(i, 10) / (24 * 3600)
Next i
when i am running this, i am getting the error overflow...
can you please help me in rectifying the error??
please
thanks a lot
Dim Num_Parts As Integer
Sheets("Sheet1").Activate
Num_Parts = Cells(5, 2)
Worksheets("Sheet2").Activate
For i = 2 To Num_Parts + 1
Cells(i, 8) = Cells(i, 6) * Cells(i, 3)
Cells(i, 9) = Cells(i, 7) * Cells(i, 3)
Cells(i, 10) = Cells(i, 8) + Cells(i, 9)
Cells(i, 11) = Cells(i, 8) / (24 * 3600)
Cells(i, 12) = Cells(i, 9) / (24 * 3600)
Cells(i, 13) = Cells(i, 10) / (24 * 3600)
Next i
when i am running this, i am getting the error overflow...
can you please help me in rectifying the error??
please
thanks a lot