#1   Report Post  
Posted to microsoft.public.excel.misc
rblivewire
 
Posts: n/a
Default Macro Help??

I just need a macro that will add "_ed1" to the end of an already
existing column of numbers.
Any suggestions?

  #2   Report Post  
Posted to microsoft.public.excel.misc
Trevor Shuttleworth
 
Posts: n/a
Default Macro Help??

One way:

Sub Add_ed1()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In _
Range("A1:A" & Range("A65536").End(xlUp).Row)
cell.Value = cell.Value & "_ed1"
Next 'cell
Application.ScreenUpdating = True
End Sub

Regards

Trevor


"rblivewire" wrote in message
oups.com...
I just need a macro that will add "_ed1" to the end of an already
existing column of numbers.
Any suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.misc
rblivewire
 
Posts: n/a
Default Macro Help??

What do I change to make it at the users selection which cells to
change? Also, do you know why it keeps locking up everytime I run it
for more than 20 cells?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Macro Help??

I don't see any reason why it would lock up with more than 20 cells, but you
could change the code to something like:

Sub Add_ed1()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Selection.cells
cell.Value = cell.Value & "_ed1"
Next 'cell
Application.ScreenUpdating = True
End Sub

rblivewire wrote:

What do I change to make it at the users selection which cells to
change? Also, do you know why it keeps locking up everytime I run it
for more than 20 cells?


--

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
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


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