Hi,
I'm using Excel 2013. I want to find the word "hello" anywhere in a worksheet. After finding "hello" I want to concatenate this cell with the cell on the immediate right.
I've written the code below halfway to give you an understanding of the logic. However, I don't know how to complete the code. Please help. Thanks.
I'm using Excel 2013. I want to find the word "hello" anywhere in a worksheet. After finding "hello" I want to concatenate this cell with the cell on the immediate right.
I've written the code below halfway to give you an understanding of the logic. However, I don't know how to complete the code. Please help. Thanks.
Code:
Sub test()
Dim cel As Range, cfind As Range
For Each cel In ActiveSheet.UsedRange
If cel = "" Then GoTo nextcel
Set cfind = cel.Find("hello", , xlValues, xlPart, xlRows, xlNext, False)
If Not cfind Is Nothing Then
'I don't know what to do here
End If
nextcel:
Next cel
End Sub