Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Add additional value to a cell

Has anyone got a quick fix for this:

A1 has a value of "Subtitles:"

I'd like to make three macro's that, when run individually, ADDS their value
to A1.

Ie.

Macro 1 inserts the value "English"
Macro 2 inserts the value ", Spanish"
Macro 3 inserts the value ", French"

So if I run macro 1, A1 will then contain the value "Subtitles:English"
Then if I run macro 2, A1 will then contain the value "Subtitles:English,
Spanish"

I need to add maybe 10 different subtitle languages, so it must be a macro
that adds the additional subtitle to the cell.

Any ideas ?

Rasmus




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Add additional value to a cell

Sub AddEnglish()
Range("A1").Value = Trim(Range("A1")) & " English"
End sub

Sub AddSpanish()
Range("A1").Value = Trim(Range("A1")) & ", Spanish"
End Sub

Sub AddFrench()
Range("A1").Value = Trim(Range("A1")) & ", French"
End Sub

and so forth.


Rasmus wrote in message
le.rogers.com...
Has anyone got a quick fix for this:

A1 has a value of "Subtitles:"

I'd like to make three macro's that, when run individually, ADDS their

value
to A1.

Ie.

Macro 1 inserts the value "English"
Macro 2 inserts the value ", Spanish"
Macro 3 inserts the value ", French"

So if I run macro 1, A1 will then contain the value "Subtitles:English"
Then if I run macro 2, A1 will then contain the value "Subtitles:English,
Spanish"

I need to add maybe 10 different subtitle languages, so it must be a macro
that adds the additional subtitle to the cell.

Any ideas ?

Rasmus






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Add additional value to a cell

Ooops!
Should be:
ActiveWorkbook.Sheets("Sheet1").Range("A1").Value = _
ActiveWorkbook.Sheets("Sheet1").Range("A1").Value & ": English"

HTH
Henry


"Tom Ogilvy" wrote in message
...
Text is a read only property of a range. You can't assign a value to

Text.

--
Regards,
Tom Ogilvy

Henry wrote in message
...
Rasmus

Macro 1

ActiveWorkbook.Sheets("Sheet1").Range("A1").Text = _
ActiveWorkbook.Sheets("Sheet1").Range("A1").Text & ": English"

Macro 2

ActiveWorkbook.Sheets("Sheet1").Range("A1").Text = _
ActiveWorkbook.Sheets("Sheet1").Range("A1").Text & ", Spanish"

Etc.

HTH
Henry

"Rasmus" wrote in message
le.rogers.com...
Has anyone got a quick fix for this:

A1 has a value of "Subtitles:"

I'd like to make three macro's that, when run individually, ADDS their

value
to A1.

Ie.

Macro 1 inserts the value "English"
Macro 2 inserts the value ", Spanish"
Macro 3 inserts the value ", French"

So if I run macro 1, A1 will then contain the value

"Subtitles:English"
Then if I run macro 2, A1 will then contain the value

"Subtitles:English,
Spanish"

I need to add maybe 10 different subtitle languages, so it must be a

macro
that adds the additional subtitle to the cell.

Any ideas ?

Rasmus










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 cell colours Johanna Gronlund Excel Discussion (Misc queries) 1 September 10th 09 11:41 AM
How to add additional description in a cell to a spreadsheet? Judy S Setting up and Configuration of Excel 1 August 29th 07 05:09 PM
inserting an additional line of text within same cell knet22 Excel Worksheet Functions 2 February 17th 06 12:58 AM
Inserting additional data into a cell Alec H Excel Discussion (Misc queries) 4 February 9th 06 04:46 PM
Inserting additional data into an existing cell? CSJ545 Excel Discussion (Misc queries) 4 November 22nd 05 01:28 PM


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