Excellency

View Original

The LEFT function

The LEFT function is a text function which returns the number of characters you request from the left of the field. This works all cells, but certain interactions may not work as you intend, for example date values will not return based on the visible output but on the number it represents.

This is the format of the LEFT function:

=LEFT(CELL RANGE, NUMBER OF CHARACTERS)

Here is an example of the LEFT function:

=LEFT(“Pluto has always been a planet!”, 5) = Pluto 

LEFT function returning the first 5 characters from the selected text string

This function is valuable when you have fields you would like to dynamically extract values from without needing to use the Text-to-Columns wizard. This could be a product description field, a customer name field, or an address field where only certain components are required.

An example of a functional implementation of this would be to create custom tracking metrics for purchases from your shops. As multiple shops are within one city, it is possible to have clients that visit both locations. You decide to pull a combination of shop number and client postal code as a way to view where in the city each stores clients are from.

ex: shop numbers are column B, customer postal codes are in column G, data starts in row 2

=CONCAT(B2, “-“ ,LEFT(G2,3))

* Note this example uses the CONCAT function. For greater detail on this function please visit its function page *