I have a list of addresses in column A. Most of the addresses are fine, but some of the addresses have too many spaces between words, e.g. there might be one cell in column a which has six spaces like:
while another might have three spaces like:Please Login or Register to view this content.
I want to get rid of any double/triple/quadruple/nth spaces that exist and change them to just a single space. I know that in this case, n will never be more than 10.Please Login or Register to view this content.
I know that the following formula works in B1:
That changes any double spaces to single spaces. And I could do another iteration of the same formula in C1 which would be:Please Login or Register to view this content.
which would reduce all the original triple spaces to single spaces (they became double spaces in column B), etc., and I could do that another 8 times across the next columns and I would achieve what I want.Please Login or Register to view this content.
But surely there is a way to do this with one formula.
I tried doing this in B1:
which caters for up to 10 spaces but Excel reports "#VALUE!" when I try that. I don't know why.Please Login or Register to view this content.
Is there another way to do it? And is there a reason why the OR function that I tried is not working?
Thank you so much in advance!
Bookmarks