long story short, i haven't used dynamic variables before and i'm not sure why i keep getting this subscript out of range error -- as soon as it gets to the row i've starred it crashes wih the error - in the debugger i can see that the value of ActiveCell is just "Trade Ticket"
VB Code:
Dim trigger As String Dim Labels() As String Dim Data() As Variant Dim inputRow As Integer Dim inputCol As Integer Dim counter As Integer counter = 0 inputRow = 1 inputCol = 1 Do While trigger <> "InputEnd" ' finds rows with data If trigger = "Input" Then ' takes data out of relevant rows inputRow = ActiveCell.Row inputCol = ActiveCell.Column Do While ActiveCell.Offset(0, 1) <> "End" Label = ActiveCell.Value **** Labels(counter) = ActiveCell.Value Data(counter) = ActiveCell.Offset(1, 0).Value counter = counter + 1 Loop Else End If inputRow = inputRow + 1 Cells(inputRow, inputCol).Select trigger = ActiveCell.Value Loop




Reply With Quote