Sub test()
Dim i As Long, j As Long
Dim output As String
Dim text1 As String
Dim text2 As String
Dim text1split1
Dim text1split2
Dim lastrow As Long
lastrow = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To lastrow
text1 = Range("A" & i).Value
text2 = Range("B" & i).Value
text1split1 = Split(text1, " ")
text1split2 = Split(text2, " ")
For j = 0 To UBound(text1split1)
If output <> "" Then
output = output & " " & text1split1(j) & " " & text1split2(j)
Else
output = text1split1(j) & " " & text1split2(j)
End If
Next j
Range("C" & i).Value = output
Next i
End Sub
こんにちはSrinathは、SOへようこそ下記のコードを参照してください。ここの人々はあなたのコードを無料で書くためのものではありません。連結する 'vba'文字列演算子は'& 'です。 –
結果が1つのセルまたは対応する行のセルに存在する必要がありますか(C1のJones Jones、C2のandroid ANDROIDなど)? – Brian