Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I add additional text in many cells

Hello,

I'd like to know how I can insert the same additional text to cells when
there is already text in these cells without having to type it in every cell
separately:
H1/1
H7/2
H8/3
should read
H1/1_9.11
H7/2_9.11
H8/3_9.11

Thanks

Markus
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How do I add additional text in many cells

Hi,

One way. Right cleck the sheet tab, view code and paste this in. Select the
range where your data are and then run this code:-

Sub addtext()
newtext = "_9.11"
Set myrange = Selection
For Each c In myrange
If c.Value = "H1/1" Or c.Value = "H7/2" Or c.Value = "H8/3" _
Then c.Value = c.Value & newtext
Next
End Sub

Mike

"The Austrian" wrote:

Hello,

I'd like to know how I can insert the same additional text to cells when
there is already text in these cells without having to type it in every cell
separately:
H1/1
H7/2
H8/3
should read
H1/1_9.11
H7/2_9.11
H8/3_9.11

Thanks

Markus

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I add additional text in many cells

Hi Mike,

I have about a 100 cells with different text so if I have to type
"If c.Value = "H1/1" Or c.Value = "H7/2" Or c.Value = "H8/3" _
Then c.Value = c.Value & newtext"

the contents of each cell in the macro program then it's quicker to manually
paste the text in each cell. Or is there another way?

Thanks Markus


"Mike H" wrote:

Hi,

One way. Right cleck the sheet tab, view code and paste this in. Select the
range where your data are and then run this code:-

Sub addtext()
newtext = "_9.11"
Set myrange = Selection
For Each c In myrange
If c.Value = "H1/1" Or c.Value = "H7/2" Or c.Value = "H8/3" _
Then c.Value = c.Value & newtext
Next
End Sub

Mike

"The Austrian" wrote:

Hello,

I'd like to know how I can insert the same additional text to cells when
there is already text in these cells without having to type it in every cell
separately:
H1/1
H7/2
H8/3
should read
H1/1_9.11
H7/2_9.11
H8/3_9.11

Thanks

Markus

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I add additional text in many cells

Sub addtext()
newtext = "_9.11"
Set myrange = Selection
For Each c In myrange
c.Value = c.Value & newtext
Next c
End Sub


Gord Dibben MS Excel MVP

On Mon, 12 Nov 2007 02:47:01 -0800, The Austrian
wrote:

Hi Mike,

I have about a 100 cells with different text so if I have to type
"If c.Value = "H1/1" Or c.Value = "H7/2" Or c.Value = "H8/3" _
Then c.Value = c.Value & newtext"

the contents of each cell in the macro program then it's quicker to manually
paste the text in each cell. Or is there another way?

Thanks Markus


"Mike H" wrote:

Hi,

One way. Right cleck the sheet tab, view code and paste this in. Select the
range where your data are and then run this code:-

Sub addtext()
newtext = "_9.11"
Set myrange = Selection
For Each c In myrange
If c.Value = "H1/1" Or c.Value = "H7/2" Or c.Value = "H8/3" _
Then c.Value = c.Value & newtext
Next
End Sub

Mike

"The Austrian" wrote:

Hello,

I'd like to know how I can insert the same additional text to cells when
there is already text in these cells without having to type it in every cell
separately:
H1/1
H7/2
H8/3
should read
H1/1_9.11
H7/2_9.11
H8/3_9.11

Thanks

Markus


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
Additional Help with range of cells [email protected] Excel Worksheet Functions 1 September 21st 07 03:37 PM
Inserting Additional Text in Spreadsheet SEBA Branch Inventory Excel Worksheet Functions 3 June 27th 07 05:58 PM
Additional rows added to spreadsheet when opening text files kidofseph Excel Discussion (Misc queries) 0 April 25th 07 09:54 PM
inserting an additional line of text within same cell knet22 Excel Worksheet Functions 2 February 17th 06 12:58 AM
How to input additional text to multiple of existing cells that has text [email protected] Excel Worksheet Functions 2 June 21st 05 01:46 AM


All times are GMT +1. The time now is 12:07 PM.

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"