Returns a substring from the beginning of a specified string.
ExamplesWas this helpful? How can we improve it? Sometimes, you may want to remove the first character from the string and get the rest of the string in Google Sheets. While you can do this manually for a short dataset, when you have tens or hundreds of such cells, using in-built formulas is the right way to do this. In this short Google Sheets tutorial, I will show you how to remove the first characters from a string in Google Sheets using Text formulas.
How to Remove the First Character from a String in Google SheetsSuppose you have a dataset a shown below and you want to get rid of the first character and only get the numeric part: Using the RIGHT FormulaBelow is the formula that will remove the first character and give you the remaining part of the string: =RIGHT(A2, LEN(A2)-1) The above formula first checks the length of the string (using the LEN function) and then subtracts 1 from it. This gives us the number of characters that we want to get from the right part of the string. This value is then used in the RIGHT function to extract all the characters in a string, except the first one. Using the MID FormulaAnother way to remove the first character and get everything else is by using the MID formula. It uses the same logic as the one in the RIGHT function, with a slight difference in the syntax. The below formula will give us everything except the first character from the string: =MID(A2,2,LEN(A2)-1) The MID formula asks for the starting position (from which it should start extracting the characters), and the number of characters to be extracted. You can further shorten this formula and use the one below: =MID(A2,2,99999) In the above formula, I give the MID function the starting position (which will be 2 as I don’t want the first character) and the length of the characters to be extracted. Instead of using the LEN function to count the characters, I have used a really large number to extract all the characters. In case there are less number of characters (as in our example), it simply extracts everything. Using the REPLACE FormulaThere are multiple ways to dong the same thing with different formulas in Google Sheets. Another quick way to do this would be to replace the first character with a blank character, and you can do this using the REPLACE function. Below is the formula that will remove the first character and give you the rest: =REPLACE(A2,1,1,"") The above formula starts from the first position and replaces the first character with a blank. Note: In all the three examples covered here, the result is through a formula. If you don’t want the formula after you have got the result, convert it into values. This way, you can even get rid of the original data if you don’t need it. While I have shown you how to remove the first character in the above examples, you can easily modify the formulas to remove any number of characters from the beginning. Just tweak the formula to specify the number of characters instead of 1. Hope you found this tutorial useful! You may also like the following Google Sheets tutorials:
How do I get the first character of a string in Google Sheets?Steps (formula Explanation):-. We can use the SPLIT function to split the string into three parts based on the space delimiter. =split(A2," "). Then using the LEFT function, we can extract the first letter from each word. =ArrayFormula(left(split(A2," "),1)) ... . Just combine the result.. How do I extract the first word in Google Sheets?Note: To extract the first three words, you should apply this formula: =regexextract(A2,"[\w]* [\w]* [\w]*"), to extract first n words, you just need to add [\w]* n times in the formula.
How do I extract part of a string in Google Sheets?How to Extract Substring in Google Sheets (With Examples). Method 1: Return Substring from Beginning of String #return first 4 characters of string in cell A1 =LEFT(A1, 4). Method 2: Return Substring from Middle of String #return 4 characters of string in cell A1 starting at position 2 =MID(A1, 2, 4). |