Text pasted from other systems is often messy. Five functions tidy it:
TRIM removes spaces at the start and end and turns runs of spaces inside into single spaces.
CLEAN removes characters that can't be printed, such as line breaks from a web form.
UPPER, LOWER and PROPER change the case: PROPER capitalizes the first letter of every word.
They can be combined: =PROPER(TRIM(A2)). PROPER isn't perfect with names: it turns "mcdonald" into "Mcdonald" and "o'brien" into "O'Brien", so check names after converting.
The tidy text lives in a new column. When it's right, copy it and paste it over the original as values.