SilverBirch
New Member
- Joined
- Mar 5, 2019
- Messages
- 3
Hello guys,
I need your help.
My created a long formula in Excel and I need to convert it to VBA. I've been trying a couple of things, but always failed. Can you please help me?
So the formula (for example for cell G50) looks like this:
Lookup is the name of another sheet.
I tried something like this, but with no result
Help me, please!
I need your help.
My created a long formula in Excel and I need to convert it to VBA. I've been trying a couple of things, but always failed. Can you please help me?
So the formula (for example for cell G50) looks like this:
Code:
=IFERROR(INDEX(Lookup!K:K,IFERROR(MATCH(D50,Lookup!D:D,0),IFERROR(MATCH(D50,Lookup!E:E,0),IFERROR(MATCH(D50,Lookup!F:F,0),IFERROR(MATCH(D50,Lookup!G:G,0),MATCH(D50,Lookup!H:H,0)))))),IFERROR(INDEX(Lookup!K:K,IFERROR(MATCH(E50,Lookup!D:D,0),IFERROR(MATCH(E50,Lookup!E:E,0),IFERROR(MATCH(E50,Lookup!F:F,0),IFERROR(MATCH(E50,Lookup!G:G,0),MATCH(E50,Lookup!H:H,0)))))),""))

Lookup is the name of another sheet.
I tried something like this, but with no result
Code:
theCell.FormulaR1C1 = "=IFERROR(INDEX(Lookup!K:K,IFERROR(MATCH(R[0]C[-3],Lookup!D:D,0),IFERROR(MATCH(R[0]C[-3],Lookup!E:E,0),IFERROR(MATCH(R[0]C[-3],Lookup!F:F,0),IFERROR(MATCH(R[0]C[-3],Lookup!G:G,0),MATCH(R[0]C[-3],Lookup!H:H,0)))))),IFERROR(INDEX(Lookup!K:K,IFERROR(MATCH(R[0]C[-2],Lookup!D:D,0),IFERROR(MATCH(R[0]C[-2],Lookup!E:E,0),IFERROR(MATCH(R[0]C[-2],Lookup!F:F,0),IFERROR(MATCH(R[0]C[-2],Lookup!G:G,0),MATCH(R[0]C[-2],Lookup!H:H,0)))))),""))"
Help me, please!
