LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Joe Joe is offline
external usenet poster
 
Posts: 476
Default simple macro

Hi Folks

I have the following macro that, for the life of me, I can't seem to change so that it cuts the last 5 characters of a cell instead of the first 5 characters. Any help much appreicated.

Sub MoveAround()

Dim CellVal As String

CellVal = ActiveCell.Text
Range(ActiveCell.Address) = Right(CellVal, Len(CellVal) - 6)
ActiveCell.Offset(0, 1).Select
Range(ActiveCell.Address) = Left(CellVal, 6)
ActiveCell.Offset(1, -1).Select

End Sub
 
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
Help with simple macro Sam Commar Excel Discussion (Misc queries) 3 April 15th 08 04:30 PM
Simple macro MikeD1224 Excel Discussion (Misc queries) 1 June 9th 07 12:06 AM
Simple Macro John Excel Worksheet Functions 1 November 17th 06 05:16 PM
Simple Macro MAStew New Users to Excel 3 July 27th 06 10:50 PM
Simple Macro sparx Excel Discussion (Misc queries) 4 May 12th 06 06:25 AM


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

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"