Hi there,
I would like to know if there is a way to combine two strings together into one cell. I am talking about putting numbers together, there is a set of Account#which are on different lines and they are displayed like |Account#:12542-|5651256|" The pipe (|) is there to show the column line that runs in between them. I would like that line to disappear and the number after the "-" to be in the same cell as "Account#: " so end result should look something like "|Account#:12542-5651256|"
I know there is a way to do it which is called concatenate and I have tried it a couple of different ways but it doesn't work.
If you can help me with this I would greatly appreciate it.
example one
example two
I would like to know if there is a way to combine two strings together into one cell. I am talking about putting numbers together, there is a set of Account#which are on different lines and they are displayed like |Account#:12542-|5651256|" The pipe (|) is there to show the column line that runs in between them. I would like that line to disappear and the number after the "-" to be in the same cell as "Account#: " so end result should look something like "|Account#:12542-5651256|"
I know there is a way to do it which is called concatenate and I have tried it a couple of different ways but it doesn't work.
If you can help me with this I would greatly appreciate it.
example one
Code:
For N = nlast To 1 Step -1
If ws.Cells(N, 1).Value Like "*ACCOUNT*" Then
ws.Cells(N, 1).Value = str1
ws.Rows(N).EntireRow.Font.Bold = True
ws.Rows(N).Offset(0, 1) = str2
ws.Rows(N) = CONCATENATE(str1 & str2)
End If
Next N
Code:
st= .Cells(.Rows.Count, "A")
For i = i To 1 Step -1
If (ws.Cells(i, 1).Value Like "*ACCOUNT*") Then
st1= RTrim(.Cells(i, "A") & .Cells(i, "B"))
End If
Next i