Hi, I have the following code which returns a 'Subscript out of range' error when I run it. I have a function with input in cell F2 and output in cell N2. I'd like to take a list of non-null values in column C as inputs and record the corresponding outputs in column D.
Sub Calculate_Matches()
Dim i As Integer
i = 3
Do While Worksheets("All_Data").Cells(i, 6) <> ""
If Worksheets("All_Data").Cells(i, 3) <> "" Then
Worksheets("All_Data").Cells(2, 6).Value = Worksheets("All_Data").Cells(i, 3).Value
Worksheets("All_Data").Cells(i, 4).Value = Worksheets("All_Data").Cells(2, 14).Value
i = i + 1
End If
Loop
End Sub
I'm new to VBA - Could someone please tell me what the problem is?
Many thanks!
Bookmarks