I have a value in A38 that I would like a button that when clicked will do the equavalent of an Hlookup on my sheet 'Item Database' and return the next value in the column after the value in A38.
Basically a "Next Item" button.
I'm not sure how to tell it to take the value of the cell, do the look up and insert the value of the look up (for the next value down in the column).
Currently i have it pointed at A36 which was a way for me to test the hlookup. when I set it to A38 I dont get an error, but it the cell is blank(after deleting whatever value was in there).
Any advise is appreciated!
Private Sub CommandButton1_Click()
With Range("A38")
.Value = "=HLOOKUP(A36,'Item Database'!A2:A100000, 2,FALSE)"
.Value = .Value
With Range("B38")
.Value = "=VLOOKUP(A38,Item_ID,5,FALSE)"
.Value = .Value
End With
End With
End Sub