Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Changing data in a column

I would like to write a macro to change all the used entries in column A
such that only the right most 5 characters are displayed for each entry.
What would such a macro look like?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing data in a column

Sub Right5()
Dim rng as Range, cell as Range
Set rng = columns(1).specialCells(xlConstants)
for each cell in rng
cell.Value = right(cell.Value,5)
Next
End Sub

--
Regards,
Tom Ogilvy


"jerry chapman" wrote in message
...
I would like to write a macro to change all the used entries in column A
such that only the right most 5 characters are displayed for each entry.
What would such a macro look like?




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
need help changing column data need-some-help![_2_] Excel Discussion (Misc queries) 1 February 12th 09 02:24 AM
Changing Data in a Column DJordan Excel Discussion (Misc queries) 1 February 9th 09 05:54 AM
Changing entire column data Collegestudent05 Excel Discussion (Misc queries) 1 March 9th 05 09:02 PM
How to set up a column to accept changing data from 1 cell on ano. hdismang Excel Worksheet Functions 1 February 14th 05 01:21 AM
Changing the Direction of Data within a Column Michael Parsons Excel Worksheet Functions 1 January 27th 05 06:52 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"