To get the first part of a split in Google Sheets, use the SPLIT function and then reference the first column of its result, or use INDEX with SPLIT: =INDEX(SPLIT(A2, ","), 1, 1). This returns the text before the first delimiter. For example, if A2 contains “apple,banana,cherry”, the formula returns “apple”.
What SPLIT Does in Google Sheets
SPLIT is a native Google Sheets function that divides text into separate cells based on a delimiter you specify. Its syntax is SPLIT(text, delimiter, [split_by_each], [remove_empty_text]). The function outputs a horizontal array: each piece of text lands in its own column, starting from the cell where you enter the formula.
For example, =SPLIT("red,green,blue", ",") in cell B1 would place “red” in B1, “green” in C1, and “blue” in D1. If you only want the first piece, you need a way to grab just that first column. That’s where INDEX, or simple cell referencing, comes in.
How to Get the First Split Value (Step-by-Step)
There are several reliable methods, each with its own use case. Here are the most common approaches:
- Using INDEX with SPLIT:
=INDEX(SPLIT(A2, ","), 1, 1)– This is the most robust method because it doesn’t depend on where you place the formula. The first argument of INDEX is the array returned by SPLIT, the second is the row (always 1 for SPLIT’s horizontal output), and the third is the column (1 for the first piece). - Using a cell reference to the SPLIT result: If you put
=SPLIT(A2, ",")in cell B2, then in another cell you can simply write=B2to get the first piece. This is straightforward but requires an extra helper column. - Using LEFT and FIND (for simple delimiters):
=LEFT(A2, FIND(",", A2) - 1)returns everything before the first comma. This works well for a single delimiter but fails if the delimiter isn’t found (returns an error). It’s a good alternative if you want to avoid array formulas.
For a column of data, drag the formula down or use ARRAYFORMULA. For example, with names in A2:A10, =ARRAYFORMULA(INDEX(SPLIT(A2:A10, ","), 1, 1)) will return the first piece for each row. Note that ARRAYFORMULA is not needed with INDEX in Google Sheets because INDEX naturally handles arrays, but wrapping it can help in some contexts.
Using SPLIT with Other Functions to Get the First Item
Sometimes you need the first item as part of a larger calculation. For instance, to get the first word from a sentence in A2, you can use =INDEX(SPLIT(A2, " "), 1, 1). If you want to combine it with text, use the ampersand: ="First: " & INDEX(SPLIT(A2, ","), 1, 1).
You can also nest SPLIT inside other functions like QUERY or FILTER, but for simply extracting the first element, INDEX is the cleanest. If you need the last element, use =INDEX(SPLIT(A2, ","), 1, COUNTA(SPLIT(A2, ","))), but that’s a different topic.
Common Errors and How to Fix Them
Here are typical issues you might encounter when trying to get the first split value:
- #VALUE! error: This happens if the delimiter is not found. For example,
=INDEX(SPLIT(A2, ","), 1, 1)will error if A2 has no comma. To handle this, wrap in IFERROR:=IFERROR(INDEX(SPLIT(A2, ","), 1, 1), A2)– this returns the original text if no delimiter exists. - Delimiter is a space: If you split by space, multiple spaces can create empty pieces. Use
SPLIT(A2, " ", TRUE)to ignore empty text, or use the TRIM function first. - Split by each character: By default, SPLIT splits by each character in the delimiter string. If your delimiter is a comma followed by a space (“, “), SPLIT will treat both as separate delimiters. To treat the whole string as one delimiter, set the third argument to FALSE:
=SPLIT(A2, ", ", FALSE).
If you’re getting unexpected results, check the delimiter and whether you need the split_by_each parameter set to FALSE.
Google Sheets vs. Excel: Key Differences
Excel does not have a SPLIT function. Instead, Excel uses TEXTSPLIT (available in Microsoft 365) or the Text to Columns wizard. To get the first piece in Excel, you can use =TEXTSPLIT(A2, ",") which returns a horizontal array, then wrap in INDEX: =INDEX(TEXTSPLIT(A2, ","), 1, 1). In older Excel versions, you’d use =LEFT(A2, FIND(",", A2)-1) or the Text to Columns feature under Data > Text to Columns.
In Google Sheets, SPLIT is dynamic and spills automatically, while in Excel, TEXTSPLIT also spills. The syntax is similar, but Google Sheets’ SPLIT has the split_by_each parameter, which Excel’s TEXTSPLIT handles differently (it uses a column_delimiter argument). For most simple cases, the INDEX approach works in both.
Alternatives to SPLIT for Extracting the First Part
Depending on your data, you might prefer one of these alternatives:
- REGEXEXTRACT:
=REGEXEXTRACT(A2, "^[^,]+")returns everything up to the first comma. This is powerful for complex patterns but can be overkill. - LEFT and SEARCH:
=LEFT(A2, SEARCH(",", A2) - 1)is similar to FIND but case-insensitive. Works well for single delimiters. - QUERY with SPLIT: You can use
=QUERY(SPLIT(A2:A, ","), "select Col1")to get the first column from a range. This is useful when you need the first part for multiple rows at once.
Each method has trade-offs in readability and performance. For large datasets, SPLIT with INDEX is efficient because it avoids extra helper columns.
Frequently Asked Questions
How do I get the first word from a cell in Google Sheets?
Use =INDEX(SPLIT(A2, " "), 1, 1) to get the first word separated by spaces. If you want to ignore multiple spaces, use =INDEX(SPLIT(TRIM(A2), " "), 1, 1).
What if my delimiter is a comma followed by a space?
Set the split_by_each argument to FALSE: =INDEX(SPLIT(A2, ", ", FALSE), 1, 1). This treats “, ” as a single delimiter, so “apple, banana” splits into “apple” and “banana” correctly.
Can I get the first split value without using INDEX?
Yes, you can use =LEFT(A2, FIND(",", A2)-1) if you only need the first part and don’t mind the formula failing when no delimiter exists. Or, if you place the SPLIT formula in a cell, you can reference that cell directly.
Why does my SPLIT formula return an error when the cell is empty?
SPLIT on an empty cell returns an empty array, and INDEX may cause an error. Wrap in IFERROR: =IFERROR(INDEX(SPLIT(A2, ","), 1, 1), "") to return a blank instead.
Does SPLIT work with numbers?
Yes, SPLIT treats everything as text. If you need the result as a number, wrap in VALUE: =VALUE(INDEX(SPLIT(A2, ","), 1, 1)).
Is there a way to get the first item from a split in a new column automatically?
Use ARRAYFORMULA with INDEX: =ARRAYFORMULA(INDEX(SPLIT(A2:A, ","), 1, 1)). This will fill down for each row in the range A2:A. Note that this requires that the SPLIT function handles arrays, which it does in Google Sheets.
Related
- Battery Bank Calculation for UPS: Step-by-Step Guide
- Casio Ink for Calculator? What to Use & Avoid
- Google Sheets SUM Formula: How to Add Numbers
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Balloon Payment Calculator: How to Use ItA balloon payment calculator is a tool that estimates the large final payment due at the end of…
- Insert a Personal Signature in Word for Mac: Steps & TipsTo insert a personal signature in Word for Mac, save a picture of your handwritten signature, then choose…
- How to Select a Laptop: A Practical Buying GuideChoosing a laptop can feel overwhelming with hundreds of models, confusing specs, and a wide price range. This…
- Random Number 1-20: How to Pick OneThe random number is 14. If you need another one, use a die, a deck of cards, or…
- Salon Inventory Spreadsheet: Setup and Stock ControlA salon inventory spreadsheet is a simple way to track what products you have, where they are, and…
- Billing Invoice Template Excel: Setup and Key DetailsA billing invoice template in Excel is a reusable workbook for listing goods or services, calculating charges, and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.