LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using a macro to edit part of a cell

Am trying to edit data in the worksheet where I have to edit only part
of the text in the cell - using a macro.

146-P1-0502 L
145-P13-0502 L
145-P8-0403 L
145-P9-0504 L
145-P10-0406 L

I only want to change the 0502 part to 0706 in all the cells. Tried
using a macro to select only part of it but it changes the other data
parts also.

I tried the code below but then it doesn't work for 145-P13-0502 L
where we have 2 digits after the P.

Dim StartChar As Integer
Dim EndChar As Integer
StartChar = 8
EndChar = 3
ActiveCell.Characters(StartChar, EndChar).Insert (206)

Please help.

 
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
Using macro to copy a part of a cell content to next cell Charles Excel Discussion (Misc queries) 6 May 31st 06 05:57 AM
I cannot edit cell format in Excel 2000 (Part of office 2000)! Brett Excel Discussion (Misc queries) 1 April 12th 06 05:58 PM
Can you make a cell with a diagonal, so that you can edit the upper and lower part of the cell? g wills New Users to Excel 3 February 17th 05 10:23 PM
How do I edit a formula as part of a macro? Jacob Wood Excel Discussion (Misc queries) 1 January 25th 05 11:02 PM
Edit Macro for GOTO Part No. RSB Excel Programming 2 December 1st 04 07:21 PM


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