As you know, IFERROR and SUBSTITUTE functions are not supported in Xcelsius. That's why I had to find alternative ways to tackle this problem and after ten-minute googling, I found the solution.
In my Xcelsius project, user is prompted to enter the file path. Therefore, it is supposed to check the file path that the user entered. I needed to replace backslash(\) with forwardslash(/) because the file path cannot include backslash. For this, I wrote this excel formula and it works pretty fine.
In B2 Cell, there is the code below.
IF(ISERROR(REPLACE(B1,FIND("\",B1,1),1,"/")),B1,REPLACE(B1,FIND("\",B1,1),1,"/"))
IF(ISERROR(.....,X,Y)) works as IFERROR function.
REPLACE(B1,FIND("\",B1,1),1,"/") works as SUBSTITUTE function.
This is not entirely true.
ReplyDeleteSUBSTITUE function changes all instances, but REPLACE function only one instance.