Today’s post will be fairly short, but we will discuss the very handy
TRIM formula.

What is TRIM?

TRIM is a formula that removes trailing spaces from the beginning and the end of a text in a cell.

Is that a big deal?

HELL YEAH!
It is when you have to hunt these pesky spaces in a huge list of data.
I usually ran in to this situation when I had list of workers sent and I was trying to VLOOKUP or INDEX MATCH the names, addresses or the like.
Then you see all this #N/A errors?!?
Then you have to go and examine the cells that error out to find that it looks the same, but someone added an extra space at the END of the text in the cell?

These two cells are NOT the same

LOOK! I will show you.

Excel trim
Non matching cells due to trailing spaces

Here comes TRIM to the rescue!

What does TRIM need?

The formula only need an input, where the cell contains text It will remove any trailing space from the beginning or the end of the text!

Excel trim formula
Excel trim formula

With this you can embed the TRIM formula inside your VLOOKUP formula so you doing the trimming on the fly.
An example would be:

=VLOOKUP(TRIM(A1),B1:C10,2,0)

Where the lookup_value (A1) is wrapped in a trim.

I do hope that you liked today’s post. Keep in touch on our facebook page, or if you have a question just drop a comment below.

[et_pb_ccfcm_facebook_comments_module ccfcm_app_id=”339898187197719″ _builder_version=”4.6.1″ _module_preset=”default”][/et_pb_ccfcm_facebook_comments_module]