How to compare two cells and ignore leading and trailing spaces by using the TRIM worksheet function
Article ID: 142588
Article Last Modified on 9/13/2006
APPLIES TO
- Microsoft Excel 5.0 Standard Edition
- Microsoft Excel 5.0c
- Microsoft Excel 5.0 for Macintosh
- Microsoft Excel 5.0a for Macintosh
- Microsoft Excel 5.0 Standard Edition
- Microsoft Excel 95 Standard Edition
- Microsoft Excel 95a
- Microsoft Excel 97 Standard Edition
- Microsoft Excel 98 for Macintosh
- Microsoft Excel 2000 Standard Edition
- Microsoft Excel 2002 Standard Edition
- Microsoft Office Excel 2003
This article was previously published under Q142588
SUMMARY
You can use the TRIM worksheet function in Microsoft Visual Basic for
Applications to compare the contents of two cells so
that leading spaces and trailing spaces are ignored.
Additional query words: 5.00a 5.00c XL98 XL97 XL7 XL5
Keywords: kbhowto kbprogramming kbcode KB142588