If you want to replace spaces with dashes in Excel, you can do so using a formula. To do this, you'll need to use the SUBSTITUTE function. The SUBSTITUTE function takes three arguments: the text you want to search, the text you want to replace, and the text you want to replace it with. So, to replace spaces with dashes, you would use a formula like this:
=SUBSTITUTE(A1," ","-")
This formula will search the text in cell A1 for spaces and replace them with dashes. You can then copy and paste this formula into other cells to replace spaces with dashes in those cells as well.