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!

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], " ")))

5 Likes

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

2 Likes

@Suvrutt_Gurjar it worked great, thanks!

2 Likes