iainmartin100
New Member
- Joined
- Mar 9, 2011
- Messages
- 43
Hi,
I have the below formula [in Red] writen in VBA but unfortunatly it doesn't work, if I run the code it pastes the whole line as text within the cell, if I then click on the cell and press ctrl+shift+enter it works perfectly.
One of the Mods on here said that it's because I need to use R1C1.
I have attempted this [In Green below] but no luck.
Can someone lend a helping hand?
My original VB formula was:
Range("H68").FormulaArray = "{=INDEX('[" & wbName & "]MS Groups'!$F$2:$F$6000,MATCH($H$7&$C$68,'[" & wbName & "]MS Groups'!$C$2:$C$6000&'[" & wbName & "]MS Groups'!$D$2:$D$6000))}"
And my failed attempt at changing the above to R1C1 is below:
Range("h68").FormulaArray = "{=INDEX('[" & wbName & "]MS Groups'!r6c2:r6c6000,MATCH(r8c7&r3c68,'[" & wbName & "]MS Groups'!r3c2:r3c6000&'[" & wbName & "]MS Groups'!r4c2:r4c6000))}"
Many thanks in advance for any assistance.
<!-- / message -->
I have the below formula [in Red] writen in VBA but unfortunatly it doesn't work, if I run the code it pastes the whole line as text within the cell, if I then click on the cell and press ctrl+shift+enter it works perfectly.
One of the Mods on here said that it's because I need to use R1C1.
I have attempted this [In Green below] but no luck.
Can someone lend a helping hand?
My original VB formula was:
Range("H68").FormulaArray = "{=INDEX('[" & wbName & "]MS Groups'!$F$2:$F$6000,MATCH($H$7&$C$68,'[" & wbName & "]MS Groups'!$C$2:$C$6000&'[" & wbName & "]MS Groups'!$D$2:$D$6000))}"
And my failed attempt at changing the above to R1C1 is below:
Range("h68").FormulaArray = "{=INDEX('[" & wbName & "]MS Groups'!r6c2:r6c6000,MATCH(r8c7&r3c68,'[" & wbName & "]MS Groups'!r3c2:r3c6000&'[" & wbName & "]MS Groups'!r4c2:r4c6000))}"
Many thanks in advance for any assistance.
<!-- / message -->