Using the following code to try and create a concatenated formula in VB so that I end up with a useable web address. I cannot get it to work and keep getting a "Type MisMatch" error:
The "substitute" formula works fine, why not the web address? I need to pull in the value in column D from the current row - am I going about it the wrong way?
Code:
crow = ActiveCell.Row
Cells(crow, "D:D").Select
ActiveCell.FormulaR1C1 = "=SUBSTITUTE(RC[-1], "" "",""-"")"
Cells(crow, "B:B").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(""http://www.webaddresshere.com/"",(crow, ""D:D"")," / ")"
The "substitute" formula works fine, why not the web address? I need to pull in the value in column D from the current row - am I going about it the wrong way?