My problem with char(30)

O

omikron123

Hi to all!

I don´t understand at all the role of char(30) in the formula

=RIGHT(F2;LEN(F2)-FIND(CHAR(30);SUBSTITUTE(F2;".";CHAR(30);LEN(F2)-LEN(SUBSTITUTE(F2;".";"")))))

Char(30) is record separator, but in a string (e.g. 1 Prelude.mp3)
:confused: ????
What does it mean?
 
J

JE McGimpsey

It's a placeholder that is presumably not likely to be found in the
string in F2.

The outside SUBSTITUTE() function replaces the last "." character in F2
with CHAR(30). That character is then used by FIND() to locate where the
last "." is.

One could save a function call using

=MID(F2; FIND(CHAR(30); SUBSTITUTE(F2;".";CHAR(30);
LEN(F2)-LEN(SUBSTITUTE(F2;".";""))))+1;255)
 
O

omikron123

Thank you very much.:) :) :)

JE said:
It's a placeholder that is presumably not likely to be found in the
string in F2.

The outside SUBSTITUTE() function replaces the last "." character in
F2
with CHAR(30). That character is then used by FIND() to locate where
the
last "." is.

One could save a function call using

=MID(F2; FIND(CHAR(30); SUBSTITUTE(F2;".";CHAR(30);
LEN(F2)-LEN(SUBSTITUTE(F2;".";""))))+1;255)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top