Hello everyone. I am a newbie (student only) and I am working on a macro that needs to sum up time according to a certain column.

Here is the input sheet:


The output needs to be like this one:



But then I am getting this error:



And the answer shows up like this on Column B:



I have been working on this for like 3 days and nothing seems to be working.. Help please

Btw, here is the code came up (Thanks to google. I literally have no knowledge about macro. Hehe)
Error in RED.

Sub ComputeTime()

Dim Row As Long
Dim Row1, Row2 As String
Dim lengthRow1, lengthRow2 As String
Dim range1 As range
Dim range2 As range
Dim rng As range


Set range1 = Application.InputBox(prompt:="Enter SR No. Column", Type:=8)
Set range2 = Application.InputBox(prompt:="Enter Time Spent Column", Type:=8)
Set rng = Application.Union(range1, range2)


rng.Select
Selection.Copy


Sheets.Add.Name = "TimeSummary"
Sheets("TimeSummary").Select

ActiveSheet.Paste


Cells.Select
Selection.Sort _
Key1:=range("A2"), Order1:=xlAscending, _
Key2:=range("B2"), Order2:=xlDescending, _
Header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


Row = 2
Do While (Cells(Row, 1) <> "")

Row1 = Cells(Row, "A")
Row2 = Cells(Row + 1, "A")

lengthRow1 = Cells(Row, "B")
lengthRow2 = Cells(Row + 1, "B")


If (Row1 = Row2) Then
Cells(Row, "B") = Cells(Row, "B") + Cells(Row + 1, "B")
Rows(Row + 1).Delete


Else
Row = Row + 1
End If
Loop
End Sub