concatenate cell.value
You are trying to concantanate using the value that you are replacing in the
same cell.
2 options
1
use a different cell to concantanate the 2 values
Sub tst()
For Each cell In Columns(5)
cell.FormulaR1C1 = "=rc[-2] & rc[-1]"
Next
End Sub
or
assign the value that is in column d to a variable and concantante col c
with the variable
HTH
"caroline" wrote:
I am trying to concatenate 2 values (for instance new value in cell D4=
current value cell D4 + value Cell D3)
I get an error message 13 with this code:
For Each cell In Columns(4)
cell.Value = cell.Value & cell.Offset(0, -1).Value
Next
Any idea?
thanks
--
caroline
|