MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Vlookup Vba increment

Posted by Zander on February 13, 2002 5:56 AM

I'm trying to increment the returned value in a lookup table by one using a combobox on a form. The code so far is:
dim test, amount
test = ComboBox1.Value

If test <> "" Then
amount = Application.WorksheetFunction.VLookup(Val(test), Range("names"), 4)

but how do I increase the value in the lookup table? NB the forth column?

Any Ideas


Posted by zander on February 13, 2002 6:27 AM

I've just worked it out by adding the folowing code:

Cells(6 + test, 5).Value = amount + 1