Detailed error checking has not been implemented...
Sub test()
Dim myList, i&, s(3), x(1), myRow&, myItem, LR&
myList = Array(Array("Symbol", ""), Array("Item", ""), Array("Flag", ""))
LR = Cells.SpecialCells(11).Row
Application.DisplayAlerts = False
For i = 0 To 2
On Error Resume Next
myList(i)(1) = Application.InputBox("Select column for " & myList(i)(0), Type:=8).Column
If myList(i)(1) = "" Then Exit Sub
myList(i)(1) = Range(Cells(2, myList(i)(1)), Cells(LR, myList(i)(1))).Address
On Error GoTo 0
Next
s(0) = InputBox("Enter Symbol"): If s(0) = "" Then Exit Sub
If Application.CountIf(Range(myList(0)(1)), s(0)) = 0 Then MsgBox "No symbol found", , s(0): Exit Sub
s(2) = s(0): If Not IsNumeric(s(2)) Then s(2) = Chr(34) & s(0) & Chr(34)
s(3) = Application.InputBox("Enter Value", Type:=1)
s(1) = s(3)
Application.ScreenUpdating = False
Do
myRow = GetNearestRow(myList, s, LR)
If myRow > 0 Then
Cells(myRow, 3) = "x"
s(1) = s(1) + s(3)
End If
Loop While s(1) <= LR
Application.ScreenUpdating = True
End Sub
Function GetNearestRow&(myList, s, LR&)
Dim x(1), myItem
If s(1) = 21000 Then Stop
x(0) = Evaluate("max(if((" & myList(0)(1) & "=" & s(2) & ")*(" & myList(1)(1) & _
"+0<=" & s(1) & ")," & myList(1)(1) & "+0))")
x(1) = Evaluate("min(if((" & myList(0)(1) & "=" & s(2) & ")*(" & myList(1)(1) & _
"+0>=" & s(1) & ")," & myList(1)(1) & "+0))")
If (x(0) = 0) + (x(1) = 0) Then
myItem = Application.Max(x(0), x(1))
Else
If s(1) - x(0) < x(1) - s(1) Then
myItem = x(0)
Else
myItem = x(1)
End If
End If
If myItem = 0 Then GetNearestRow = 0: Exit Function
GetNearestRow = Evaluate("match(" & myItem & "," & myList(1)(1) & "+0,0)") + 1
End Function