ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   replace command (https://www.excelbanter.com/excel-discussion-misc-queries/3520-replace-command.html)

Jean-Francois

replace command
 
Hi, I used the replace command as follow:
=REPLACE(J474,FIND("/",J474),255,"") but now I see in my file that is not
only a slash i have in my format column. Can anybody have a way to specify,
if do not find the slash just copy the content.
Here are some exemple what i can find other than my slash:
120 g
50 Livret
200's
25 Refill
This is other than an slash but i need to copy them not replace.

Thanks

Peo Sjoblom

One way

=IF(ISNUMBER(FIND("/",J474)),REPLACE(J474,FIND("/",J474),255,""),J474)


Regards,

Peo Sjoblom

"Jean-Francois" wrote:

Hi, I used the replace command as follow:
=REPLACE(J474,FIND("/",J474),255,"") but now I see in my file that is not
only a slash i have in my format column. Can anybody have a way to specify,
if do not find the slash just copy the content.
Here are some exemple what i can find other than my slash:
120 g
50 Livret
200's
25 Refill
This is other than an slash but i need to copy them not replace.

Thanks


Jean-Francois

Thank You it's working

"Peo Sjoblom" wrote:

One way

=IF(ISNUMBER(FIND("/",J474)),REPLACE(J474,FIND("/",J474),255,""),J474)


Regards,

Peo Sjoblom

"Jean-Francois" wrote:

Hi, I used the replace command as follow:
=REPLACE(J474,FIND("/",J474),255,"") but now I see in my file that is not
only a slash i have in my format column. Can anybody have a way to specify,
if do not find the slash just copy the content.
Here are some exemple what i can find other than my slash:
120 g
50 Livret
200's
25 Refill
This is other than an slash but i need to copy them not replace.

Thanks



All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com