Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How to use "CONCATENATE" function in VBA

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default How to use "CONCATENATE" function in VBA

if i understand correctly, maybe something like this

Sub addtext()
Dim lastrow As Long
Dim cell As Range
Dim rng As Range
lastrow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Set rng = Range("A1:A" & lastrow)
For Each cell In rng.Cells
cell.Value = "UT_" & cell.Value
Next cell
End Sub

--


Gary


wrote in message
oups.com...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" Dennis Excel Discussion (Misc queries) 0 July 17th 06 02:38 PM
How to use "CONCATENATE" function in VBA [email protected] Excel Worksheet Functions 1 November 11th 05 04:40 PM
Please add a "sheet" function like "row" and "column" functions Spreadsheet Monkey Excel Programming 2 November 8th 05 04:08 PM


All times are GMT +1. The time now is 09:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"