Hi,
I'm having real trouble with VBA. I want to search a table for values in column A and return the values in colum d.
The values in A are changing through the chart.
This is what i have as a test and all I get is it entering the formula and not putting the values called out in the set statments.
Dim c As Integer
Dim b As Integer
c = 4
b = 2
Dim lookin As Range
Dim lookfor As Range
Set lookin = Range("a1:G4")
Set lookfor = Range("A" & CStr(b))
ActiveCell.Formula = "=VLOOKUP(lookfor,lookin,4,TRUE)"
I would like to be able to have A1:g4 as a variable and b will be cycling....
any ideas?
Bookmarks