> ## Documentation Index
> Fetch the complete documentation index at: https://docs.less.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Split Columns

> Split text columns by delimiters

The Split Columns tool enables you to break apart a piece of text using a "marker" (delimiter) - like how you might cut a piece of paper where you see dotted lines.

The Split Columns tool can be highly customized. You can choose your delimiter, if you want to split to rows or columns, how many columns/splits you want and whether you want to split from left-to-right or right-to-left.

<Tip>
  The Split Columns tool is very similar to the Text to Columns function in Excel
</Tip>

### Configuration

The Split Columns tool consists of three required input and two optional input.

<Steps>
  <Step title="Split column">
    Select the column you want to split.
  </Step>

  <Step title="Delimiter">
    Input the delimiter by which you want to split.

    <Warning>
      The delimiter is case-sensitive.
    </Warning>
  </Step>

  <Step title="Split type">
    Select if you want to split to rows or columns.
  </Step>

  <Step title="Max splits (optional)">
    This is an optional input. Select how many split you maximum want to create. This can be helpful if you data structure is not consistent and you want a particularly part of the content split.
  </Step>

  <Step title="Direction (optional)">
    This is an optional input. Select the direction to want to split - you can choose left-to-right or right-to-left.

    Defaults to left-to-right.
  </Step>
</Steps>

### Example: I want to do something fun 🍌

Here you can see how you can split a column by a text delimiter into unlimited columns.

<Frame>
  <img className="rounded-md" src="https://mintcdn.com/less-51/tvKC10PJfN6EkkU2/images/tools/split-columns/Fun.png?fit=max&auto=format&n=tvKC10PJfN6EkkU2&q=85&s=1cf9ec86994a4ab93d6bdc1f9f95e3f9" width="2194" height="1556" data-path="images/tools/split-columns/Fun.png" />
</Frame>

### Example: Getting the country from an address

Here we have a number of addresses that differ in the format and country. We're interested in the country.

If we split without a direction or max split, we would get the following result:

<Frame>
  <img className="rounded-md" src="https://mintcdn.com/less-51/tvKC10PJfN6EkkU2/images/tools/split-columns/AddressBad.png?fit=max&auto=format&n=tvKC10PJfN6EkkU2&q=85&s=15e981de023fec962a4388ecc74c77e6" width="3790" height="770" data-path="images/tools/split-columns/AddressBad.png" />
</Frame>

We see that we sometimes have country in the fourth column and sometimes in the fifth because of the differing format.

If we add a direction of right-to-left and set a max split of 1, we get the following result:

<Frame>
  <img className="rounded-md" src="https://mintcdn.com/less-51/tvKC10PJfN6EkkU2/images/tools/split-columns/AddressGood.png?fit=max&auto=format&n=tvKC10PJfN6EkkU2&q=85&s=3a4ca12828e8bde366106331014364aa" width="2194" height="1556" data-path="images/tools/split-columns/AddressGood.png" />
</Frame>

We see that we now have the country in the first new column and the rest of the address in the second new column.

### Example: Splitting line items to rows

Here we have a number of line items that are separated by a comma. We want to split these into rows.

<Frame>
  <img className="rounded-md" src="https://mintcdn.com/less-51/tvKC10PJfN6EkkU2/images/tools/split-columns/LineItems.png?fit=max&auto=format&n=tvKC10PJfN6EkkU2&q=85&s=aeab210ec5091a2d589939225b1dc6be" width="2194" height="1556" data-path="images/tools/split-columns/LineItems.png" />
</Frame>

We see that we now have separated the line items into rows.
