Hello!
I'm trying to develop the concatenate UDF, that should concatenate values in 2 columns for each row:
<tbody>
</tbody>
In column "C (correct value)" - the values I want to get, in column "C (incorrect value)<strike></strike>" - the values I getting now.
I need your advise.
Thank you in advance.
I'm trying to develop the concatenate UDF, that should concatenate values in 2 columns for each row:
Code:
Function ConcatData(a As Integer, b As Integer) As Variant
For i = 1 To Cells(Rows.Count, a).End(xlUp).Row
ConcatData = Cells(i, a).Value & " " & Cells(i, b).Value
Next i
End Function
A | B | C (UDF) | C (correct value) | C (incorrect value)<strike></strike> |
Ford | Escort | =ConcatData<strike></strike>(1,2) | Ford Escort | Ford Escort<strike></strike> |
Ford | Mustang | =ConcatData<strike></strike>(1,2)<strike></strike> | Ford Mustang | Ford Escort<strike></strike> |
<tbody>
</tbody>
In column "C (correct value)" - the values I want to get, in column "C (incorrect value)<strike></strike>" - the values I getting now.
I need your advise.
Thank you in advance.