addressing type in FormulaR1C1

S

Stefi

Hi All,

What does it depend on that FormulaR1C1 generates relative or absolute cell
references?
I have a macro with several FormulaR1C1, with different results, e.g.
Range("E2").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(C[-1],RC[-1])"
generates =COUNTIF(D:D,D2), that's OK, but

Range("I2").Select
ActiveCell.FormulaR1C1 = _
"=INDEX(R2C[-3]:R" & noOfNames & "C[-3],MATCH(RC[-1],R2C[-2]:R" &
noOfNames & "C[-2],0))"
generates =INDEX(F$2:F$6,MATCH(H2,G$2:G$6,0))
Why are $ signs at the row references and how can I influence their presence?
Infact I want to generate this mixed type formula:
=INDEX(F2:F$6,MATCH(H2,G2:G$6,0))
How can I do that?

Thanks,
Stefi
 
S

Stefi

Sorry, ignore this post! I found the answer!
Stefi


„Stefi†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top