Function tenderSummary()
For i = 5 To 10
If cell(i, 66) <> "" Then
If Range("TenderPrice") <> "" Then
Range("TenderTicker").Copy cell(i, 66)
Range("Quantity").Copy cell(i, 67)
Range("TenderPrice").Copy cell(i, 68)
Range("Start").Copy cell(i, 69)
Range("End").Copy cell(i, 70)
End If
If Range("TenderPrice2") <> "" Then
Range("TenderTicker2").Copy cell(i, 66)
Range("Quantity2").Copy cell(i, 67)
Range("TenderPrice2").Copy cell(i, 68)
Range("Start_2").Copy cell(i, 69)
Range("End_2").Copy cell(i, 70)
End If
If Range("TenderPrice3") <> "" Then
Range("TenderTicker3").Copy cell(i, 66)
Range("Quantity3").Copy cell(i, 67)
Range("TenderPrice3").Copy cell(i, 68)
Range("Start_3").Copy cell(i, 69)
Range("End_3").Copy cell(i, 70)
End If
End If
Next
End Function
For the above code, I keep getting "Sub or Function not defined", could anyone explain why?
Essentially, I have my variables: TenderPrice, TenderTicker, Quantity, Start, End (same for TenderPrice2,...,End2, and those marked with 3), and these variables are dynamic in nature, meaning that they disappear after around 20s or so.
My task is to build a tender summary to keep these tenders in place as static data, and the above is what I have written - to copy paste in the first line, and skip the first line if there's data in it already to the second and so on.
How can I fix this problem?
cellSnotcell. Search forcell(replace withcells(. They should all be capitalized automagically.