bluefuel318
New Member
- Joined
- Feb 8, 2007
- Messages
- 30
I know that this is a crazy-looking formula, but I am about to rip my hair out trying to figure out why I keep getting a syntax error when I try to run it in my macro.
<code> Selection.FormulaR1C1 = _
Selection.Value & "; due " &TEXT(VLOOKUP(RC[10],'[OPEN POs.xlsm]Open Orders'!C5:C11,7,0),""MM/DD"")&"" from ""&INDEX('[OPEN POs.xlsm]Open Orders'!C1,MATCH(RC[10],'[OPEN POs.xlsm]Open Orders'!C5,0))&"" ""&VLOOKUP(RC[10],'[OPEN POs.xlsm]Open Orders'!C5:C13,9,0)
</code>
I know that the Text formula on works, because this functions correctly:
<code>
Selection.FormulaR1C1 = _
"=""due ""&TEXT(VLOOKUP(RC[10],'[OPEN POs.xlsm]Open Orders'!C5:C11,7,0),""MM/DD"")&"" from ""&INDEX('[OPEN POs.xlsm]Open Orders'!C1,MATCH(RC[10],'[OPEN POs.xlsm]Open Orders'!C5,0))&"" ""&VLOOKUP(RC[10],'[OPEN POs.xlsm]Open Orders'!C5:C13,9,0)"
</code>
but I want the result of the formula appended to the current cell contents, and I just can't get that to work. I'm hoping it's just a misplaced quote or something.
Any help that anyone could give would be appreciated. Thank you!
<code> Selection.FormulaR1C1 = _
Selection.Value & "; due " &TEXT(VLOOKUP(RC[10],'[OPEN POs.xlsm]Open Orders'!C5:C11,7,0),""MM/DD"")&"" from ""&INDEX('[OPEN POs.xlsm]Open Orders'!C1,MATCH(RC[10],'[OPEN POs.xlsm]Open Orders'!C5,0))&"" ""&VLOOKUP(RC[10],'[OPEN POs.xlsm]Open Orders'!C5:C13,9,0)
</code>
I know that the Text formula on works, because this functions correctly:
<code>
Selection.FormulaR1C1 = _
"=""due ""&TEXT(VLOOKUP(RC[10],'[OPEN POs.xlsm]Open Orders'!C5:C11,7,0),""MM/DD"")&"" from ""&INDEX('[OPEN POs.xlsm]Open Orders'!C1,MATCH(RC[10],'[OPEN POs.xlsm]Open Orders'!C5,0))&"" ""&VLOOKUP(RC[10],'[OPEN POs.xlsm]Open Orders'!C5:C13,9,0)"
</code>
but I want the result of the formula appended to the current cell contents, and I just can't get that to work. I'm hoping it's just a misplaced quote or something.
Any help that anyone could give would be appreciated. Thank you!