Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Am trying to cancatenate one column in Excel. It has +950
rows, want to add "RS8" to each cell value, cell value is text like "-009" (4 charactors only), so each cell value will become RS8 + Cell.Value ("RS8-009") Thanks in advance. Rick |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is one way that it will work for you. Im sure there are many others
with another solution. Sub test3() Dim rng As Range Dim val As String Dim addval As String Set rng = Range("B2:B1000") 'set the range of cells to be affected addval = "RS8" 'initialize the text to add to the start of the contents For Each cl In rng ' cycle through the cells val = addval & cl.Value ' add the value to the beginning of the cell contents cl.Value = val 'place the new value as the value of the cell Next cl End Sub HTH Terry " wrote in message ... Am trying to cancatenate one column in Excel. It has +950 rows, want to add "RS8" to each cell value, cell value is text like "-009" (4 charactors only), so each cell value will become RS8 + Cell.Value ("RS8-009") Thanks in advance. Rick |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Terry
THANKS for reply. I'll give this a try. I think I see how that works thanks to your input. Rick -----Original Message----- This is one way that it will work for you. Im sure there are many others with another solution. Sub test3() Dim rng As Range Dim val As String Dim addval As String Set rng = Range("B2:B1000") 'set the range of cells to be affected addval = "RS8" 'initialize the text to add to the start of the contents For Each cl In rng ' cycle through the cells val = addval & cl.Value ' add the value to the beginning of the cell contents cl.Value = val 'place the new value as the value of the cell Next cl End Sub HTH Terry " wrote in message ... Am trying to cancatenate one column in Excel. It has +950 rows, want to add "RS8" to each cell value, cell value is text like "-009" (4 charactors only), so each cell value will become RS8 + Cell.Value ("RS8-009") Thanks in advance. Rick . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
concatenate | Excel Worksheet Functions | |||
CONCATENATE | Excel Worksheet Functions | |||
Concatenate | Excel Discussion (Misc queries) | |||
concatenate | Excel Worksheet Functions | |||
I know how to concatenate ,can one de-concatenate to split date? | New Users to Excel |