Slug generator for Google Sheets (Excel) Google Docs

Web programming topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 825
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

Slug generator for Google Sheets (Excel) Google Docs

Post by Saman » Thu Feb 01, 2018 10:42 am

Replace C2 with the text field of yours and place this under Slug field
=LOWER(SUBSTITUTE(REGEXREPLACE(REGEXREPLACE(TRIM(C2),"[^a-zA-Z0-9\s]",""),"\s{2,}"," ")," ","-"))

For MS Excel, you need to either implement REGEXREPLACE or use a more generic form =LOWER(SUBSTITUTE(TRIM(A2), ” “, “-“))
Post Reply

Return to “Web programming”