Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can I remove "n" characters from the start of a series of entries?

I frequently have to strip the numbers and following space "01 " etc. from of a list of tunes, such as this set list from the Grateful Dead:


01 Tuning

02 Bertha

03 Me & My Uncle

04 Next Time You See Me

05 Morning Dew

06 Playing In The Band

07 Loser

08 Easy Wind

09 Me & Bobby Mcgee

10 Greatest Story Ever Told

11 Johnny B. Goode

12 Tuning

13 Truckin'

14 Tuning

15 Hard To Handle

16 Deal

17 Sugar Magnolia

18 Casey Jones

19 Good Lovin'

20 Going Down The Road Feeling Bad

21 Saint Stephen

22 Not Fade Away

23 Uncle John's Band


Despite looking all over I haven't been able to find a simple text tool or single-serving web app that does this, but I'm getting the sense that it can be easily done in Excel so is such a function possible in Numbers?


Your counsel most gratefully appreciated.


That's the first night from the Manhattan Center in April of '71 for the curious. An excellent Betty Board!

iMac with Retina 5K display, OS X Yosemite (10.10.3)

Posted on May 21, 2015 8:41 AM

Reply
Question marked as Best reply

Posted on May 21, 2015 8:50 AM

use another column to get the right portion of the contents of the cells with the original entries.


Assuming the data is in column A


you can get the length of the string (the count of the characters) by using the function:

=len(A1)


you can get the right most 10 characters of the string in column A using the formula:

=right(A1, 10)


in each case you want to get the right most length minus three characters-- assuming there are no more than 99 songs.


The most general solution locates the position of the space (which separates the numbers from the song title).


User uploaded file


Column B contains the fixed titles

B1=RIGHT(A1,LEN(A1)−FIND(" ", A1))

this is shorthand for, select cell B1, then type (or copy and paste from here) the formula:

=RIGHT(A1,LEN(A1)−FIND(" ", A1))


select cell B1, copy

select column B, paste


you can move the contents of column B by select the cells, then copy

select the destination

then use the menu item "Edit > Paste Formula Results"

6 replies
Question marked as Best reply

May 21, 2015 8:50 AM in response to BelaBartok

use another column to get the right portion of the contents of the cells with the original entries.


Assuming the data is in column A


you can get the length of the string (the count of the characters) by using the function:

=len(A1)


you can get the right most 10 characters of the string in column A using the formula:

=right(A1, 10)


in each case you want to get the right most length minus three characters-- assuming there are no more than 99 songs.


The most general solution locates the position of the space (which separates the numbers from the song title).


User uploaded file


Column B contains the fixed titles

B1=RIGHT(A1,LEN(A1)−FIND(" ", A1))

this is shorthand for, select cell B1, then type (or copy and paste from here) the formula:

=RIGHT(A1,LEN(A1)−FIND(" ", A1))


select cell B1, copy

select column B, paste


you can move the contents of column B by select the cells, then copy

select the destination

then use the menu item "Edit > Paste Formula Results"

May 21, 2015 9:04 AM in response to BelaBartok

If your numbers are always two digits, you can select the cells containing the tunes and run this simple script (copy-paste into Script Editor, in Applications > Utilities, and click run). No need to mess with formulas and extra columns. (But try on a test column first to make sure it's doing what you want).


SG


tell application "Numbers"

tell front document to tell active sheet

set t to first table whose selection range's class is range

repeat with c in t's selection range's cells

set c's value to (c's value as string)'s text 4 thru -1

end repeat

end tell

end tell

Can I remove "n" characters from the start of a series of entries?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.