mfisher316
New Member
- Joined
- Mar 8, 2007
- Messages
- 7
I have a counter loop macro written that cuts/pastes columns, and inserts rows if specific conditions apply. Here's the dilemma, say column C is my active cell. I need a vlookup formula that looks at column A, next row, against data in the range A4:B55 on a separate worksheet. I have tried the following but none have worked:
activecell.formulaR1C1= "=vlookup(+R[1]C[-2],Costcodes!$A$4:$B$55,2)" - can you not have specific range reference w/ an r1c1 formula??
I have set variables x and y to be eqal to "4 - counter" and "55-counter" respectively (so that it always pulls from the correct range) with the following formula:
activecell.formulaR1C1="=vlookup(+R[1]C[-2],Costcodes!R[x]C[-2]:R[y]C[-2],2)"
but that hasn't worked either. Any suggestions?
Thanks in advance!
activecell.formulaR1C1= "=vlookup(+R[1]C[-2],Costcodes!$A$4:$B$55,2)" - can you not have specific range reference w/ an r1c1 formula??
I have set variables x and y to be eqal to "4 - counter" and "55-counter" respectively (so that it always pulls from the correct range) with the following formula:
activecell.formulaR1C1="=vlookup(+R[1]C[-2],Costcodes!R[x]C[-2]:R[y]C[-2],2)"
but that hasn't worked either. Any suggestions?
Thanks in advance!