-
Delete ** in end of each cell of right
I have about 46000 cell in column D that some of them ** in end of each data like Orange** or 1234** now I need a VBA code that can delete these 2 star . also I have some data like this : 3424** RMP3232 I do not want delete the star of these data .
Thank you very much .
-
[VBA]Sub DelAsterisk()
Dim cel As Range
For Each cel In Selection
If Right(cel, 2) = "**" Then cel.Value = Left(cel, Len(cel) - 2)
Next
End Sub[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules