Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use "CONCATENATE" function in VBA

0 views
Skip to first unread message

mar_...@wp.pl

unread,
Nov 11, 2005, 10:51:15 AM11/11/05
to
Hello
How can I do something like this I want to add to all cells in range
Range("A:A").SpecialCells(xlCellTypeConstants) a prefix string like UT_
for example. I know there is a "character" but how i can use it for ma
Range
____A_____B____
1 | UT_string | |
2 | UT_string | |
3 | UT_string | |
4 | UT_string | |
..........................
40| UT_string | |
41| | |
Thanks for response

Jay Petrulis

unread,
Nov 16, 2005, 7:34:18 PM11/16/05
to

Something like this, perhaps?

'''''''''''''''''''''
Sub test()

Dim rngCells As Range, _
Cell As Range

Const strAPPEND As String = "UT_"

With ActiveWorkbook
With .ActiveSheet
On Error Resume Next
Set rngCells =
.Range("A:A").SpecialCells(xlCellTypeConstants)
Err.Clear
On Error GoTo 0

If Not rngCells Is Nothing Then
For Each Cell In rngCells
Cell = strAPPEND & Cell.Text
Next Cell
End If

End With
End With

End Sub
'''''''''''''''''''''''''

0 new messages