简体   繁体   中英

Excel Find/Replace Macro one step further

I use excel to store links. Inside those links i have some parts that i want edit (i do that with find/replace macro) and some that i want to delete, however Find and Replace can't delete random codes.

An example is : lty=1&rc=fpcDlkseLz4&ra

What i want macro to remove is "rc=xxxxxxxxxxx&" for all links, with the random code able to take digits,letters upper or lower case.

Try below non-vba solution

  =MID(A1,1,FIND("rc=",A1,1)-1)&RIGHT(A1,(LEN(A1)-FIND("&",A1,FIND("rc=",A1,1))))

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM