Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Adding text to a cell

I have used Word VBA a lot but am new to Excel VBA. I am
trying to add a string ("Verify") to a cell that already
contains text. I tried to create a variable for the
existing text and then add the new string in front of the
variable, but it doesn't work. What should I have written?

Dim variable1
Worksheets("Sheet1").Activate
ActiveCell.FormulaR1C1 = variable1
ActiveCell.Value = "Verify" & variable1
ActiveCell.Offset(1, 0).Activate


Thanks for any help you can give.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Adding text to a cell

ActiveCell.Value = "Verify " & activcell.Value

--
Regards,
Tom Ogilvy


"David" wrote in message
...
I have used Word VBA a lot but am new to Excel VBA. I am
trying to add a string ("Verify") to a cell that already
contains text. I tried to create a variable for the
existing text and then add the new string in front of the
variable, but it doesn't work. What should I have written?

Dim variable1
Worksheets("Sheet1").Activate
ActiveCell.FormulaR1C1 = variable1
ActiveCell.Value = "Verify" & variable1
ActiveCell.Offset(1, 0).Activate


Thanks for any help you can give.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Adding text to a cell

That was easy. Thanks Tom--very fast response. This simple
code (plus an "activecell.offset" command line) will be
used by engineers to save hours of time (and thus help
improve efficiency and help keep inflation down--or maybe
just give them more time to browse the internet :)
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
Adding Text if Value of Cell = 0 MrMeth Excel Worksheet Functions 2 February 23rd 11 04:06 PM
Adding text to cell Grugs Excel Worksheet Functions 5 July 16th 09 04:55 AM
Adding hyphen to text in cell Penny[_2_] Excel Discussion (Misc queries) 6 March 25th 09 02:08 AM
Adding the cell if text is contained within Bizzy Excel Discussion (Misc queries) 1 March 28th 07 02:11 AM
Adding Cell Range with Text JohnHill Excel Worksheet Functions 2 August 1st 05 03:30 AM


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