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 help

Hi Folks

I have the following macro that cuts the front 6 characters out of a cell and pastes that data in another cell. I have tried but can't modify it to cut the last 5 characters from a cell and paste them in another cell. I swear I'm missing something really easy here. All 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 a simple macro Roger Dodger Excel Discussion (Misc queries) 2 August 26th 11 04:26 AM
Simple (?) Macro NeedHelp Excel Discussion (Misc queries) 3 January 21st 07 10:39 PM
Need Simple Macro jreinert New Users to Excel 2 June 15th 06 03:58 PM
Simple Macro sparx Excel Discussion (Misc queries) 4 May 12th 06 06:25 AM
Help with simple(?) macro Cutter[_2_] Excel Programming 7 July 2nd 04 01:30 AM


All times are GMT +1. The time now is 08:27 AM.

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"