PDA

View Full Version : VBA to delete first 3 characters and keep cell formatting



tjack1022
03-12-2019, 10:07 AM
Hello, Super new to VBA and feeling well over my head at this point. Is what I'm requesting below even possible?

I would like to create a macro with the shortcut ctrl + shift + h that does the following:



Removes the first 3 characters of the first line of the selected cell
Keeps the remaining text in the cell
Keeps the line breaks and formatting of cell in tact


Example B1 Cell:

***Please send this now
$100 to the bank

03/10 - Money is available

Result needed:

Please send this now
$100 to the bank

03/10 - Money is available

Dave
03-12-2019, 03:08 PM
NewString = Right(Original, Len(Original) - 3)
Code to remove 1st 3 letters of a string. HTH. Dave

大灰狼1976
03-12-2019, 05:51 PM
another way.
[b1] = Mid([b1],4)