A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Add the same character(s) to multiple cells in a column (or row) .



 
 
Thread Tools Display Modes
  #1  
Old December 16th 04, 07:29 PM
flashcatj
external usenet poster
 
Posts: n/a
Default Add the same character(s) to multiple cells in a column (or row) .

I want to add the suffix "scc" into the contiguous cells of several columns
on an existing Excel spreadsheet. There is existing data (alpha/numeric) in
each of the cells already, so the scc suffix would be added to the right of
the existing entries. I'm trying to avoid having to enter each suffix into
each cell individually. I have Excel 2002 and Windows XP Professional.
Thank you.
Ads
  #2  
Old December 16th 04, 07:37 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default

Use a help formula

=Sheet1!A1&"scc"

copy down/across, then copy and paste special as values in place ,
finally replace the old values with the new

Regards,

Peo Sjoblom

"flashcatj" wrote:

> I want to add the suffix "scc" into the contiguous cells of several columns
> on an existing Excel spreadsheet. There is existing data (alpha/numeric) in
> each of the cells already, so the scc suffix would be added to the right of
> the existing entries. I'm trying to avoid having to enter each suffix into
> each cell individually. I have Excel 2002 and Windows XP Professional.
> Thank you.

  #3  
Old December 16th 04, 07:38 PM
Michael Kintner
external usenet poster
 
Posts: n/a
Default

you can also format the cell and add the text around the number so the value
stays a number vs text by added a text string.

"flashcatj" > wrote in message
...
>I want to add the suffix "scc" into the contiguous cells of several columns
> on an existing Excel spreadsheet. There is existing data (alpha/numeric)
> in
> each of the cells already, so the scc suffix would be added to the right
> of
> the existing entries. I'm trying to avoid having to enter each suffix into
> each cell individually. I have Excel 2002 and Windows XP Professional.
> Thank you.



  #4  
Old December 16th 04, 07:59 PM
Jason Morin
external usenet poster
 
Posts: n/a
Default

Select the range and run:

Sub AddSuffix()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Selection
With cell
If Not .HasFormula Then
.Value = .Value & "scc"
End If
End With
Next
Application.ScreenUpdating = True
End Sub

---
HTH
Jason
Atlanta, GA

>-----Original Message-----
>I want to add the suffix "scc" into the contiguous cells

of several columns
>on an existing Excel spreadsheet. There is existing

data (alpha/numeric) in
>each of the cells already, so the scc suffix would be

added to the right of
>the existing entries. I'm trying to avoid having to

enter each suffix into
>each cell individually. I have Excel 2002 and Windows

XP Professional.
>Thank you.
>.
>

  #5  
Old December 16th 04, 10:39 PM
Gord Dibben
external usenet poster
 
Posts: n/a
Default

And to give you more options like a choice of text and left or right addition

Sub Add_Text()
Dim Cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
whichside = InputBox("Left = 1 or Right =2")
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
If whichside = 1 Then
For Each Cell In thisrng
Cell.Value = moretext & Cell.Value
Next
Else
For Each Cell In thisrng
Cell.Value = Cell.Value & moretext
Next
End If
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub


Gord Dibben Excel MVP

On Thu, 16 Dec 2004 11:59:27 -0800, "Jason Morin"
> wrote:

>Select the range and run:
>
>Sub AddSuffix()
>Dim cell As Range
>Application.ScreenUpdating = False
>For Each cell In Selection
> With cell
> If Not .HasFormula Then
> .Value = .Value & "scc"
> End If
> End With
>Next
>Application.ScreenUpdating = True
>End Sub
>
>---
>HTH
>Jason
>Atlanta, GA
>
>>-----Original Message-----
>>I want to add the suffix "scc" into the contiguous cells

>of several columns
>>on an existing Excel spreadsheet. There is existing

>data (alpha/numeric) in
>>each of the cells already, so the scc suffix would be

>added to the right of
>>the existing entries. I'm trying to avoid having to

>enter each suffix into
>>each cell individually. I have Excel 2002 and Windows

>XP Professional.
>>Thank you.
>>.
>>


  #6  
Old October 5th 05, 04:37 PM
BOB KHAN
external usenet poster
 
Posts: n/a
Default

Hello Gordon,

I am trying to add LDM- To column which has exsisting data

CELE-315 SHOULD BECOME LDM-CELE-320BX
CELE-315BX SHOULD BECOME LDM-CELE-315BX

PLEASE ADVISE,

BOB

"Gord Dibben" wrote:

> And to give you more options like a choice of text and left or right addition
>
> Sub Add_Text()
> Dim Cell As Range
> Dim moretext As String
> Dim thisrng As Range
> On Error GoTo endit
> whichside = InputBox("Left = 1 or Right =2")
> Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
> .SpecialCells(xlCellTypeConstants, xlTextValues)
> moretext = InputBox("Enter your Text")
> If whichside = 1 Then
> For Each Cell In thisrng
> Cell.Value = moretext & Cell.Value
> Next
> Else
> For Each Cell In thisrng
> Cell.Value = Cell.Value & moretext
> Next
> End If
> Exit Sub
> endit:
> MsgBox "only formulas in range"
> End Sub
>
>
> Gord Dibben Excel MVP
>
> On Thu, 16 Dec 2004 11:59:27 -0800, "Jason Morin"
> > wrote:
>
> >Select the range and run:
> >
> >Sub AddSuffix()
> >Dim cell As Range
> >Application.ScreenUpdating = False
> >For Each cell In Selection
> > With cell
> > If Not .HasFormula Then
> > .Value = .Value & "scc"
> > End If
> > End With
> >Next
> >Application.ScreenUpdating = True
> >End Sub
> >
> >---
> >HTH
> >Jason
> >Atlanta, GA
> >
> >>-----Original Message-----
> >>I want to add the suffix "scc" into the contiguous cells

> >of several columns
> >>on an existing Excel spreadsheet. There is existing

> >data (alpha/numeric) in
> >>each of the cells already, so the scc suffix would be

> >added to the right of
> >>the existing entries. I'm trying to avoid having to

> >enter each suffix into
> >>each cell individually. I have Excel 2002 and Windows

> >XP Professional.
> >>Thank you.
> >>.
> >>

>
>

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
linking cells in Excel 2003. How to not truncate to 255 characters. GarryFerg Excel Discussion (Misc queries) 5 December 8th 04 03:33 PM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM
How can I combine multiple cells in Excel? jallbright24 Excel Discussion (Misc queries) 1 November 29th 04 04:54 PM
background formatting across multiple cells Casper Excel Discussion (Misc queries) 0 November 26th 04 11:18 AM
How do I extract cells from multiple workbooks Trevor Excel Discussion (Misc queries) 1 November 25th 04 10:59 PM


All times are GMT +1. The time now is 03:02 PM.


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