Trim leading and trailing blanks.
Data in Excel is taken from a
multitude of sources - often copied and pasted into the spreadsheet
from text based sources. Often this leads to spaces being included at
the start or end, or both sides of text. This generally leads to
problems with lookups, spoils the presentation of data, and makes the
spreadsheet uneccessarily larger than it needs to be.
With lookups the
problem is especially frustrating because the value may look the same
as it does in other parts of the spreadsheet, with very subtle
differences because of embedded spaces. To Excel these subtle
differences make a big difference.