Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Hayley
 
Posts: n/a
Default Inserting text within a cell

I would like to insert a , with a cell.

i have Wood T 3,1

i would like to have
Wood T,3/1
  #2   Report Post  
Hayley
 
Posts: n/a
Default

Sorry it should read
I have Woods T 3/1
i want Woods T, 3/1

Thank you

"Hayley" wrote:

I would like to insert a , with a cell.

i have Wood T 3,1

i would like to have
Wood T,3/1

  #3   Report Post  
Vicar
 
Posts: n/a
Default

If cell A1 contains (surname)(single space)(single initial)(single
space)(score), the following will achieve what you want:

=LEFT(A1,FIND(" ",A1)+1)&","&RIGHT(A1,LEN(A1)-LEN(LEFT(A1,FIND(" ",A1)+1)))

HTH

"Hayley" wrote:

Sorry it should read
I have Woods T 3/1
i want Woods T, 3/1

Thank you

"Hayley" wrote:

I would like to insert a , with a cell.

i have Wood T 3,1

i would like to have
Wood T,3/1

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about:

=REPLACE(A1,SEARCH(" ",A1,1)+2,2,", ")

It looks for the first space character, comes over two more, and replaces the
space with a space-comma.



Hayley wrote:

Sorry it should read
I have Woods T 3/1
i want Woods T, 3/1

Thank you

"Hayley" wrote:

I would like to insert a , with a cell.

i have Wood T 3,1

i would like to have
Wood T,3/1


--

Dave Peterson
  #5   Report Post  
Hayley
 
Posts: n/a
Default

Thanks Dave - it works been bugging me for ages. thanks again

"Dave Peterson" wrote:

How about:

=REPLACE(A1,SEARCH(" ",A1,1)+2,2,", ")

It looks for the first space character, comes over two more, and replaces the
space with a space-comma.



Hayley wrote:

Sorry it should read
I have Woods T 3/1
i want Woods T, 3/1

Thank you

"Hayley" wrote:

I would like to insert a , with a cell.

i have Wood T 3,1

i would like to have
Wood T,3/1


--

Dave Peterson



  #6   Report Post  
Rachael
 
Posts: n/a
Default Inserting text within a cell

Do you know how I would go about adding a ' at the beginning of each cell in
a column without changing the information already in each cell?

"Dave Peterson" wrote:

How about:

=REPLACE(A1,SEARCH(" ",A1,1)+2,2,", ")

It looks for the first space character, comes over two more, and replaces the
space with a space-comma.



Hayley wrote:

Sorry it should read
I have Woods T 3/1
i want Woods T, 3/1

Thank you

"Hayley" wrote:

I would like to insert a , with a cell.

i have Wood T 3,1

i would like to have
Wood T,3/1


--

Dave Peterson

  #7   Report Post  
Dave Peterson
 
Posts: n/a
Default Inserting text within a cell

Is a macro ok?

Option Explicit
Sub testme()
Dim myRng As Range
Dim myCell As Range

Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.Cells.SpecialCells(xlCellTypeConstants))
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "No constants in selection!"
Exit Sub
End If

For Each myCell In myRng.Cells
If myCell.PrefixCharacter < "'" Then
myCell.Value = "'" & myCell.Text
End If
Next myCell

End Sub

Select a range and try it out.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Rachael wrote:

Do you know how I would go about adding a ' at the beginning of each cell in
a column without changing the information already in each cell?

"Dave Peterson" wrote:

How about:

=REPLACE(A1,SEARCH(" ",A1,1)+2,2,", ")

It looks for the first space character, comes over two more, and replaces the
space with a space-comma.



Hayley wrote:

Sorry it should read
I have Woods T 3/1
i want Woods T, 3/1

Thank you

"Hayley" wrote:

I would like to insert a , with a cell.

i have Wood T 3,1

i would like to have
Wood T,3/1


--

Dave Peterson


--

Dave Peterson
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 wider than one cell is not displayed in the next empty cell Len Pace Excel Discussion (Misc queries) 5 February 18th 05 12:24 AM
How to auto-fill text based on text in another cell Jason Excel Discussion (Misc queries) 3 February 16th 05 08:40 PM
Using a Text / Data output as a cell reference Jimboski Excel Discussion (Misc queries) 1 February 11th 05 07:31 PM
Link the value to text in a cell, then use that text cell in a for acpharmd Excel Worksheet Functions 6 December 29th 04 02:03 AM
Text in cell not showing in full text in cell in exces Excel Discussion (Misc queries) 2 December 23rd 04 09:13 AM


All times are GMT +1. The time now is 08:40 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"