Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 355
Default in one sheet add one word after every entry in every cell. how?

i want to add one word after every entry in every cell. my work sheet having
25000 cell entries. please help me.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default in one sheet add one word after every entry in every cell. how?

Here's some code someone gave me a while back....sorry, don't remember who.
It may help you get started...........

Sub ConcatenateMe()
Dim lastrow As Long, r As Long
Dim num1 As String
Dim num2 As String
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For r = lastrow To 1 Step -1
If Cells(r, "A") < "" Then
Cells(r, "A").Select
num1 = Selection.Value
num2 = Selection.Offset(0, 1).Value
End If
With ActiveCell
.Value = "#" & num1 & " - " & num2
End With
Next r
End Sub

hth
Vaya con Dios,
Chuck, CABGx3



"sandy" wrote:

i want to add one word after every entry in every cell. my work sheet having
25000 cell entries. please help me.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default in one sheet add one word after every entry in every cell. how?

Please be more specific. What word do you want to add? Are your cells
all in one column? All in one sheet? What type of entries do you have
in the cells (text or numeric)?

Pete

sandy wrote:

i want to add one word after every entry in every cell. my work sheet having
25000 cell entries. please help me.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default in one sheet add one word after every entry in every cell. how?

sandy

Sub Add_Text_Right()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo justformulas
Set thisrng = ActiveSheet.UsedRange.SpecialCells _
(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
For Each cell In thisrng
cell.Value = cell.Value & moretext
Next
Exit Sub
justformulas:
MsgBox "only formulas in range"
End Sub


Gord Dibben MS Excel MVP

On Wed, 20 Dec 2006 03:08:09 -0800, sandy
wrote:

i want to add one word after every entry in every cell. my work sheet having
25000 cell entries. please help me.


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
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
Linking worksheets cjgeorge Excel Worksheet Functions 5 October 16th 06 09:30 PM
Asked previously...can this not be done in excel simonsmith Excel Discussion (Misc queries) 2 May 16th 06 11:50 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM


All times are GMT +1. The time now is 09:19 PM.

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

About Us

"It's about Microsoft Excel"