Guitarde
Board Regular
- Joined
- Mar 18, 2003
- Messages
- 244
Hello,
I am trying to add via VBA a concatenate formula
I want the first element to be a variable and the 2nd to refer to a range
I do not want to return just text but really link to my cell named 'rInvoice'
if I concatenate 2 named range it works
ActiveCell.FormulaR1C1 = "=CONCATENATE(rText,rInvoice)"
But I get a Run-time error if I try to insert variables like this:
Var = "Invoice number : "
ActiveCell.FormulaR1C1 = "=CONCATENATE(" & Var & ",rInvoice)"
I am probably missing some double "" somewhere but just can't seem to figure it out...
Thanks
Eric
I am trying to add via VBA a concatenate formula
I want the first element to be a variable and the 2nd to refer to a range
I do not want to return just text but really link to my cell named 'rInvoice'
if I concatenate 2 named range it works
ActiveCell.FormulaR1C1 = "=CONCATENATE(rText,rInvoice)"
But I get a Run-time error if I try to insert variables like this:
Var = "Invoice number : "
ActiveCell.FormulaR1C1 = "=CONCATENATE(" & Var & ",rInvoice)"
I am probably missing some double "" somewhere but just can't seem to figure it out...
Thanks
Eric