简体   繁体   中英

VBA search for specific number with leading zero

Need to distinguish between 033 and 000033 (for example).

I want to change any 033 to 10033 and leave any other "033" untouched.

Not exactly sure what you asking..but I think here is what might be able to help you

If trim(strValue)="033" then
    strValue = Replace(strValue,"033","10033")
End If

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