Excel Forum
Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course




Excel Magic Trick # 155: VLOOKUP & TRIM function


When the VLOOKUP function should work and it does not, try the TRIM function to get rid of extra spaces. Use VLOOKUP & TRIM together in one formula when the values look the same but there are hidden spaces in the cell.
This trick is good for when you get data dumped into Excel from a database that may have some extra spaces, or when employees add too many spaces during data entry.
VLOOKUP retrieves the value and TRIM gets rid of extra spaces.
Also see: YTLE#70 PivotTable & TRIM function & AVERAGES





Got a Question? Ask it Here in the Forum.