How to find last space in text column

Hi everyone! I am wondering if there is a way to find the last blank space in a text column. I have a virtual column currently that is set to Ref with an equation of RIGHT([Description),10). The user enters the key column value for a related table as the last 10 characters of a Description column and then the row is linked to a different table via that key column value pulled out of the text.

My issue is that the key of the other table is now being created as a 19 character string instead of 10 so any of my new rows wonโ€™t link properly.

My thought was that if I could find the last blank space in the text, then Iโ€™d be able to pull out the last word, which would be the value I need, whether it be 10 or 19 characters. But is there a way to find the last space? I know you can find the first space using FIND(" ",[some column]).

Thanks in advance!

Solved Solved
0 3 335
1 ACCEPTED SOLUTION

Maybe you could try the below expression to find the last word in a text consisting of words with spaces.

INDEX(SPLIT([Some Column], " "), COUNT(SPLIT([Some Column], " ")))

View solution in original post

3 REPLIES 3

Maybe you could try the below expression to find the last word in a text consisting of words with spaces.

INDEX(SPLIT([Some Column], " "), COUNT(SPLIT([Some Column], " ")))

Hi @Suvrutt_Gurjar, Iโ€™m pretty certain thatโ€™ll work. Iโ€™ll give it a try. Appreciate the assistance as always!

@Suvrutt_Gurjar it worked great, thanks!

Top Labels in this Space