Use "After" in "Replace" vba code

VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,284
Office Version
  1. 365
Platform
  1. Windows
Can any one help me in this,
how do I make this statement in correct manner..
myCell.Replace "/", "/01/", xlPart, after "* Ed. *", , , False, False

The entire code is,
If myCell Like "* Ed. *" Then 'example= ABC-19076 Ed. 01-16
myCell.Replace " Ed. ", Chr(1), xlPart, , , , False, False
myCell.Replace "/", "/01/", xlPart, after "* Ed. *", , , False, False
myCell.TextToColumns , xlDelimited, , , False, False, False, False, True, Chr(1)
End If
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Ok, can any one help me in this formula,
frmlR = Right(myCell, 4)
frmlL = Left(myCell, 1) - Len(Right(myCell, 4))
in frmlL variable I do need last 4 digit..how do i minus
 
Upvote 0
Do you mean you don't need th elast four digits i.e

Code:
=(myCell-(frmlR*1))/10000

Hope this helps,

Eric
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top