Excel Formula to Slugify Text

How to create a url slug version of some text using Excel.

note this doesnt do anything fancy just replaces spaces with hyphens and lowercases it and trims extra whitespace. If you wanted to do something more fancy then you’d be looking at writing some vba code..

Formula
=LOWER(SUBSTITUTE(TRIM(A2), ” “, “-“))

Example:

C6B3C996-B612-4359-B862-0A72ABFBA127

Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

One thought on “Excel Formula to Slugify Text

Leave a Reply

Your email address will not be published. Required fields are marked *