Ask Your Question
0

How to strip of 4 left most characters in a text string in calc [closed]

asked 2014-11-13 22:21:51 +0200

caliray gravatar image

updated 2016-03-06 01:56:58 +0200

Alex Kemp gravatar image

LibreOffice 4.3, English, Calc Windows 8, English

I am using =LEFT($J69;FIND(" ";$J69;1)-1) and =RIGHT($J69;LEN($J69)-FIND(" ";$J69)) to separate first and last name by detecting a space between them but then what would work to strip off the 4 left most characters like this one where the total length is unknown. /f/u/fuji_classic_track_2.jpg

The fourth character from the left is always a "/".

Thanks for the help.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-06 01:57:10.625188

1 Answer

Sort by » oldest newest most voted
1

answered 2014-11-14 00:44:28 +0200

Lupp gravatar image

The MID() function doesn't worry about missing characters at the end. Thus, if Text is a text expression,

=MID(Text;5;10000) will work for you even if LEN(Text ) is much less than 10000.

=RIGHT(Text;LEN(Text)-4) will work as RIGHT() did in your second piece of code.

The leftmost 4 characters will be deleted.

A third variant:

=REPLACE(Text;1;4;"")

[PS: In your example I saw a "u" on the 4th position.]

edit flag offensive delete link more

Comments

Thank you for this answer and pointing out that I can't count :-) It's the fifth character that is always a /.

caliray gravatar imagecaliray ( 2014-11-14 09:25:33 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2014-11-13 22:21:51 +0200

Seen: 18,013 times

Last updated: Nov 14 '14