This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.
Use it like this!
# | A | B | C |
---|---|---|---|
1 | a | b | slug |
2 | foo | baz bing | =slugify(A2:B4) |
3 | bar | BAZ | |
4 | FOO | baz-bing |
And you get this!
# | A | B | C |
---|---|---|---|
1 | a | b | slug |
2 | foo | baz bing | foo-baz-bing |
3 | bar | BAZ | bar-baz |
4 | FOO | baz-bing | foo-baz-bing-2 |
Not the most elegant solution.. but worked for me to generate slug from one single cell, on Collun E.
Obs. I had trouble with the ' " ' caracter. So I put it in the aux cell G1.
=(SUBSTITUTE(SUBSTITUTE(trim(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(REGEXREPLACE(REGEXREPLACE(REGEXREPLACE(REGEXREPLACE(REGEXREPLACE(REGEXREPLACE(REGEXREPLACE(regexreplace(regexreplace(regexreplace(regexreplace(REGEXREPLACE(REGEXREPLACE(lower(E2);" : ";"-");",";"");"ç";"c");"à";"a");" - ";"-");"õ";"o");"ô";"o");"ã";"a");"ê";"e");"ú";"u')");"ó";"o");"í";"i");"é";"e");"?";);",";);"'";);$G$1;);":";);")";);"(";);"º";);"ª";);"á";"a");"--";"-");"=";));" ";"-");"/";))
Hope it helps