I need to use the vlookup function and the space in front of the first name is being an issue
I tried the data clean up to trim white spaces but it didn't work. I used the split function to split the name value (last name, first name) into separate values. After that I used the concantenate function to merge it into first name (space) last name, however, the space in front of the split value remains!
You can use the
TRIMfunction to remove any extra spaces from these values before concatenating them again. Example:=TRIM(A2) & " " & TRIM(B2).You should also remove any leading or trailing spaces from your lookup value by incorporating the
TRIMfunction into yourVLOOKUP:=VLOOKUP(TRIM(X2), A2:B100, 2, FALSE).Note: If you want to trim an entire column, you can use:
=ARRAYFORMULA(TRIM(A:A))in a blank cell outside the range.