Alex Gordon
Alex Gordon

Reputation: 60841

translating LOOKUP from VBA into excel formula

i have a formula that looks like this in VBA:

ActiveCell.FormulaR1C1 = "=LOOKUP(""ETG_C"",RC[-10],RC[-8])"

what would be the exact equivalent of this if i simply input it into the worksheet?

Upvotes: 0

Views: 870

Answers (1)

BradC
BradC

Reputation: 39986

You would likely have "normal" cell references like "A1" instead of less common relative reference "RC[-10]" (which means 10 columns to the left on the current row)

So it would look something like:

=LOOKUP("ETG_C",B1,D1)

or whatever the correct cells were.

Edit: If you want to keep the relative reference style, then all that would change would be the double quotes:

=LOOKUP("ETG_C",RC[-10],RC[-8])

Upvotes: 1

Related Questions