Try to do a simple macro

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

OK I am really finding this very challanging. What I want
to accomplish is I have a vertical list of several hundred
cells that have some data in them. I want to add some
additional text at the begining of the cell for each cell
(IE cell 1 has "existing text1" add "HI" so it becomes a
cell with "HI existing text1" the next cell below
has "existing text2" add "HI" so it becomes a cell
with "HI existing text2" and so on).

How do I record a macro to add the "HI" text to every cell
in the vertical list?
 
try
sub addhi()
for each c in range("a2:a200") 'selection
c.value="Hi "&c
next
end sub
 
Why can I not just track my key strokes like the old Macro
use to do. I tried inserting this into my macro and it
blew up. I am not a bloody programmer and this is driving
me crazy.
 
You didn't bother to mention that you had a macro and/or were going to
insert it. We always ask that you copy/paste your code for
comments/suggestions so that your/our time is NOT wasted. Post your code.
 
I was trying to insert the code that you provided me above
in the text stream...

Why can I not just record it directly?
 
This is a good macro Don gave you, paste it into a new module and you will be
very happy with it. All you have to do is copy and paste, no programming
required.

Dennis
=============
 
Back
Top