krisna_wisnu
New Member
- Joined
- Mar 2, 2007
- Messages
- 4
Kinda need help here.
I have this kind of code in my macro:
its working fine, but not the one that i wanted to be.
The problem is with the range, R12C10:R88C12, since my project need the range to be changed for every different file, so i need to put the 'range' value to a variable and i am trying to put the range value in a variable (which the variable value also changing as the file changed) but it wont works.
Anyone has idea??
I have this kind of code in my macro:
Code:
Dim str as string
str = "1693B_cdd"
For j = 10 To 18
Range("B" & j).FormulaR1C1 = "=VLOOKUP(RC[-1],'[" & str & ".xls]Sheet1'!R12C10:R88C12,2,0)"
Next j
its working fine, but not the one that i wanted to be.
The problem is with the range, R12C10:R88C12, since my project need the range to be changed for every different file, so i need to put the 'range' value to a variable and i am trying to put the range value in a variable (which the variable value also changing as the file changed) but it wont works.
Anyone has idea??