"Split" formula

Hi,

Any easy way to replicate the “split” formula found in Google Sheets?

1 Like

Hey Barry,

Currently, dashdash doesn’t provide the SPLIT function found in Google Sheets.
You can, however, use a combination of the LEFT, RIGHT, and SEARCH functions to achieve your objective.

Let’s assume that cell A1 contains the text “Hello, World!”
To split the sentence using the delimiter “,”, what we can do is:

B1: =LEFT(A1,SEARCH(",",A1)-1)
C1: =RIGHT(A1,LEN(A1)-SEARCH(",",A1)-1)

This will return:

B1: Hello
C1: World!

So what we did here is as follows:
For B1:

  • We used SEARCH(",",A1) to return the position of the delimiter "," which in this case returns 6.
  • To return the first part of the text, we use the LEFT function to return a substring of the text.
  • When specifying the number of characters to return we use SEARCH(",",A1)-1 to return the first part without the delimiter.

For C1:

  • For the second part, we use the same approach but instead of LEFT we use RIGHT to return a substring from the right of the text.
  • To specify the number of characters returned here, we use LEN(A1)-SEARCH(",",A1)-1 which is the length of the text excluding the first part.

I understand that this can be a bit complicated compared to a SPLIT function though. That’s why I’ll make sure to share this with our team and let you know once we have any updates.

Please let me know if you have any questions.