Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Folks!
Trying to figure out how to concatenate a string to each cell in a range of cells. I tried this: Selection.Value = ""123"" & Selection.Value Of course that did not work! I guess VBA concatenation is different from worksheet concatenation. Thanks! Biff |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using " instead of "" it works fine for me
-- Kind regards, Niek Otten "Biff" wrote in message ... Hi Folks! Trying to figure out how to concatenate a string to each cell in a range of cells. I tried this: Selection.Value = ""123"" & Selection.Value Of course that did not work! I guess VBA concatenation is different from worksheet concatenation. Thanks! Biff |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I removed one set of "" and it works if I select a single cell but I want to
do this for a range of cells. Instead of doing this: ="123"&A1 copy down, then copypaste specialvalues, then drag to column A. Thanks! Biff "Niek Otten" wrote in message ... Using " instead of "" it works fine for me -- Kind regards, Niek Otten "Biff" wrote in message ... Hi Folks! Trying to figure out how to concatenate a string to each cell in a range of cells. I tried this: Selection.Value = ""123"" & Selection.Value Of course that did not work! I guess VBA concatenation is different from worksheet concatenation. Thanks! Biff |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim cell As Range
For Each cell In Selection cell.Value = "123" & cell.Value Next cell -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Biff" wrote in message ... I removed one set of "" and it works if I select a single cell but I want to do this for a range of cells. Instead of doing this: ="123"&A1 copy down, then copypaste specialvalues, then drag to column A. Thanks! Biff "Niek Otten" wrote in message ... Using " instead of "" it works fine for me -- Kind regards, Niek Otten "Biff" wrote in message ... Hi Folks! Trying to figure out how to concatenate a string to each cell in a range of cells. I tried this: Selection.Value = ""123"" & Selection.Value Of course that did not work! I guess VBA concatenation is different from worksheet concatenation. Thanks! Biff |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Bob!
Biff "Bob Phillips" wrote in message ... Dim cell As Range For Each cell In Selection cell.Value = "123" & cell.Value Next cell -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Biff" wrote in message ... I removed one set of "" and it works if I select a single cell but I want to do this for a range of cells. Instead of doing this: ="123"&A1 copy down, then copypaste specialvalues, then drag to column A. Thanks! Biff "Niek Otten" wrote in message ... Using " instead of "" it works fine for me -- Kind regards, Niek Otten "Biff" wrote in message ... Hi Folks! Trying to figure out how to concatenate a string to each cell in a range of cells. I tried this: Selection.Value = ""123"" & Selection.Value Of course that did not work! I guess VBA concatenation is different from worksheet concatenation. Thanks! Biff |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try....
Selection.Value = "123" & Selection.Value -- Cheers Nigel "Biff" wrote in message ... Hi Folks! Trying to figure out how to concatenate a string to each cell in a range of cells. I tried this: Selection.Value = ""123"" & Selection.Value Of course that did not work! I guess VBA concatenation is different from worksheet concatenation. Thanks! Biff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Concatenation | Excel Discussion (Misc queries) | |||
Concatenation help | Excel Worksheet Functions | |||
Concatenation | Excel Discussion (Misc queries) | |||
Concatenation | Excel Discussion (Misc queries) | |||
Concatenation | Excel Programming |