You shouldn’t need a macro to do 1. As T1000 says – use trim and upper.
if cell Sheet1!A1 contains “My name” then I’d create a new Sheet with the “cleaned” data, where cell A1 on the new sheet contains =upper(Sheet1!A1)
That will give you “MY NAME”.
If you make it =upper(trim(Sheet1!A1)) then:
” MY Name”
” My NAME “
” MY NAME”
“MY Name “
“My name”
” my name “
etc all become “MY NAME”
You can fill down and across to apply to all rows/columns and get “clean” data.
I think I could also do Part 2 without needing a macro. A VLOOKUP could do it (with a N/A error if not found). You can then apply conditional formatting to highlight the cell in red / yellow etc. If you don’t want to see N/A where there is an error (i.e. you want the entered data) then you can use ISNA to reinsert the data – which I would CONCATENATE with e.g. * to give you a “highlight” and something to conditionally format on. I haven’t tested this, and it will need some tweaking but something like this on your “clean data sheet”…
=if(ISNA(vlookup(Sheet1!C1,Sheet2!$C$1:$C$1000,1,FALSE),CONCATENATE(“* “,Sheet1!C1),Sheet1!C1)
You probably want to nest in there the trim and upper functions too.