Needs help to replace wild card (VB)

Dear pros,
i am trying to let the bot replace my excel’s cell that contain [!*]
Asterik is that anything can be in between. e.g. [!1], [!1,2,3], [!1,3]
to find if it contain above and remove it & replace with next cell’s value.

i created a For each row, and if statement, but seems like when i debug, it just went pass the If statement. Any help is appreciated!


@winnie_toh Check this below code,
Row(“Note”) = Regex.Replace( Row(“Note”).ToString,"\[.*\]","")

Hope this may help you :slight_smile:

hi Manish, thank you for your prompt help!
but i think it the problem is, it seems like it didn’t even net with if condition.
i changed both now, but still there is no error msg, just went through the loop without doing anything. :frowning:

@winnie_toh Can you change double quotes of “Note” and add it manaully to that - Row(“Note”).ToSTRING.

hi! at first i thought my condition didn’t work. so i tried to change the value to something is (not symbol) e.g. 28Dec, and it worked! so meaning the system does not seem to detect the symbols.



Dear all,

in the end, i created a desktop record action which records control+F, and replace [!] to blank. it temporary works for now, but just need to be sure that the replace dialog box is pre-set with [!]. Can’t seem to be able to record what to be typed in. Appreciate if you have better solution.