ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   My problem with char(30) (https://www.excelbanter.com/excel-programming/350444-my-problem-char-30-a.html)

omikron123

My problem with char(30)
 

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?


--
omikron123
------------------------------------------------------------------------
omikron123's Profile: http://www.excelforum.com/member.php...o&userid=30478
View this thread: http://www.excelforum.com/showthread...hreadid=501372


JE McGimpsey

My problem with char(30)
 
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)



In article ,
omikron123
wrote:

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(SUBSTIT
UTE(F2;".";"")))))

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


omikron123[_2_]

My problem with char(30)
 

Thank you very much.:) :) :)

JE McGimpsey Wrote:
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)



In article ,
omikron123
wrote:

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(SUBSTIT
UTE(F2;".";"")))))

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



--
omikron123
------------------------------------------------------------------------
omikron123's Profile: http://www.excelforum.com/member.php...o&userid=30478
View this thread: http://www.excelforum.com/showthread...hreadid=501372



All times are GMT +1. The time now is 02:29 AM.

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