Pay attention when you concatenate – A1 & B1 vs. A1 & “|” & B1

In many case, we may want to combine texts from different cells.  This can be done by either CONCATENATE function or simply an Ampersand &.  E.g. A1 & B1 & C1 …… We may take it for granted as it looks so straight forward… Well.  It actually depends on the reason for combining texts from different cells.  If you are doing so because you want to Perform VLOOKUP with 2 lookup values, the robust way to combine texts should include a delimiter in between, e.g. A1 & “|” & B1 …   Why?  Because laziness has a price. Think about a situation that you have “Apples Hop” and “Apple Shop” in your data as shown below:Excel Tips - Concatenate lookup values without delimiter

You would expect “Apples Hop” be different from “Apple Shop”.  Right?  However, when you combine the words together, they become indifferent because VLOOKUP is not case-sensitive.  “ApplesHop” and “AppleShop” are basically the same to VLOOKUP as “appleshop”. To play safe, make sure you have included a delimiter in between,  see below:Excel Tips - Concatenate lookup values without delimiter 1unless you understand your data inside-out and you are 100% confident such coincidence would not happen.  Aren’t you?

Sometimes, winning a lottery is easier than making an Excel formula error-free.  🙂

About MF

An Excel nerd who just transition into a role related to data analytics at current company......😊 Recently in love with Power Query and Power BI.😍 Keep learning new Excel and Power BI stuffs and be amazed by all the new discoveries.
This entry was posted in Excel Tips, Formula and tagged , . Bookmark the permalink.

Comments, suggestions, corrections are welcome.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.