Trying to combine two cells in a Google spreadsheet, replace all the spaces with a "-", and lowercase everything.
Cell 1: GWG-1
Cell 2: Product Name 1
New Cell 3: gwg-1-product-name-1
Replacing spaces using Find and Replace You can also click the Home tab in the Ribbon and select Replace in the Find & Select group. In the Find what box, type a space. In the Replace with box, type an underscore, dash, or other value. If you want to replace the space with nothing, leave the box blank.
In an adjacent blank cell, C1 for instance, enter this formula: =SUBSTITUTE(A1,"-",""), see screenshot: 2. Press Enter key, and select cell C1, then drag the fill handle to the range that you want to contain this formula. And the dashes between the numbers have been removed.
Your basic formula is:
=LOWER(SUBSTITUTE(A1," ","-"))
We can concatenate two cells together to get the desired output:
=LOWER(SUBSTITUTE(A1&"-"&B1," ","-"))
Google Sheets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With