View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
oercim oercim is offline
external usenet poster
 
Posts: 51
Default using vlookup in vba

Hello, I have a problem. I want to use vlookup function in a loop in vba. Let say:

For i = 1 To 10
Sheets("Sheet1").Cells(i,2)) = "=VLOOKUP(C[-2],İLK1!C[-1]:C[54],i,0)"
Next

The problem is that in "VLOOKUP(C[-2],İLK1!C[-1]:C[54],i,0)" "i" is not recognized but if it is assigned as integer it works but I need it to be varible. If you help me, I will be very glad. Thanks a lot.