Excel FIND Function: Finding the Position of the Second Identical Character
Explain clearly how to use the start_num argument of the FIND function to locate the second and third occurrences of the same character, and give methods for extracting the middle content and verifying the results, suitable for handling code numbers, dates, and path data.
Key points of this article
- FIND returns only the position of the first match. To find the second one, add 1 to the first position and use it as the third argument, start_num, so the earlier character is skipped.
- To find the third occurrence, nest another FIND inside; each additional occurrence adds one more layer. When there are many layers, consider using a helper column instead.
- FIND is case-sensitive and does not support wildcards. When you need a case-insensitive search, use SEARCH instead.
- When the character cannot be found, the result shows #VALUE!. This usually means the character does not exist, the start position exceeds the text length, or the formats do not match.
- Subtracting the length after SUBSTITUTE from LEN lets you first count how many times a character appears in total, then decide which occurrence to look for.
In Excel, when handling data such as codes, dates, or paths, you often need to know the position of a certain symbol. For example, in 2024-03-15, which position is the second hyphen at? Many people use the FIND function, which only finds the first occurrence, so they don't know how to keep searching further. This article focuses on how to use the Excel FIND function to find the second identical character, and also covers finding the third one, extracting the middle content, and how to troubleshoot when the result is wrong.
After reading this, you will be able to do three things: locate the second occurrence of a character with a single formula, know when to nest functions and when to change approach, and check whether a result is reliable. Every example in the article can be reproduced yourself; just enter them into a blank spreadsheet to compare. If you want to try the calculations in the UniCell table in the OmniDoc desktop client, the same formulas can be entered there and run as well.
How do I find the second occurrence of the same character with Excel's FIND function? A one-sentence conclusion
The basic syntax of FIND is FIND(要找的字符, 被查找的文本, [起始位置]). By default it searches forward from the 1st character and returns only the position of the first occurrence. To find the second one, the key is to add 1 to the first position and use that as the starting position, so the search begins at the character right after it.
One-sentence conclusion: Use =FIND("-",A1,FIND("-",A1)+1) to get the position of the second hyphen, and the third argument of the outer FIND is start_num.
| Your situation | Recommended Practices | Cause |
|---|---|---|
| Only the position of the first identical character | =FIND("-",A1) | By default, the search starts at position 1, and the position of the first occurrence is returned directly. |
| Find the position of the second identical character | =FIND("-",A1,FIND("-",A1)+1) | Add 1 to the first position as the starting position, skipping the first character. |
| Position of the third identical character | Nest one more FIND layer outside the previous one | Each time you find one more, add 1 to the previous level's result and use that as the new starting position. |
| The position isn't fixed, or there are many layers. | Calculate with LEN and SUBSTITUTE, or record step by step in helper columns | When nested layers go too deep, formulas become hard to read and hard to modify; recording them in separate columns is more intuitive. |
| Find letters case-insensitively | Switch to the SEARCH function | FIND is case-sensitive and does not support wildcards. |
Before You Begin: Confirm These Points
Before you start writing formulas, confirm the following points first; otherwise the results are very likely to be wrong, and the cause won't be easy to spot at a glance.
- Confirm the character actually appears enough times. If A1 contains only one hyphen and you search for the second one, the formula will return an error value. This is the expected result, not a mistake in the formula.
- Note that FIND is case-sensitive.
FIND("a","Apple")returns an error because the source text has an uppercase A. For letter-based searches, first confirm that the case matches. - Don't compare numbers as text directly. If a number in a cell was exported from another system, its displayed value and its actual content may differ. It is recommended to first use LEN to check whether the character count matches what you see.
- The start position cannot exceed the text length. If start_num is greater than the length of the text, an error is also returned, so the start position in your formula should be calculated based on the original text.
- Make sure you are using half-width symbols. Hyphens or commas typed with a Chinese input method are full-width characters. FIND treats them as different characters, and if it cannot find them, it will return an error.
Steps to Find the Second Hyphen with FIND and Extract the Middle Content
Using A1's 2024-03-15 as an example, follow the steps to find the second hyphen and extract the month in between, 03.
- In a blank sheet, enter
2024-03-15in A1 as practice data. - Enter
=FIND("-",A1)in B1 and press Enter. The result should be5, which means the first dash is at position 5. - Enter
=FIND("-",A1,B1+1)in C1 and press Enter. The result should be8, which means the second dash is at position 8. Here the start position references the result in B1 and adds 1. - To write it as a single formula directly, enter
=FIND("-",A1,FIND("-",A1)+1)in D1. The result is also8, which suits cases where you don't want a helper column. - To extract the month between the two dashes, enter
=MID(A1,FIND("-",A1)+1,FIND("-",A1,FIND("-",A1)+1)-FIND("-",A1)-1)in E1. The result is03. - Check whether the result in E1 is in text format. If you want to keep leading zeros, leave it as text. If you need to calculate with it, convert it with VALUE.
- To find the third dash, wrap another layer outside: use
FIND("-",A1,FIND("-",A1)+1)as the new start position plus 1. The result here should be an error value, because2024-03-15has only two dashes. - Replace the practice data with your real data, check two or three samples first, then fill the column down.
Check each item after finishing
After the formula produces its results, it is recommended to check them item by item, especially when filling in bulk.
| Check item | How to check | What to do if there's a problem |
|---|---|---|
| Are the position numbers reasonable? | The position should be less than or equal to the text length; you can use LEN to check it. | If the values are clearly too large, check whether references to different cells have been mixed together. |
| Are the error values concentrated? | If #VALUE! appears when a character cannot be found, check whether it clusters in certain rows | Compare the original text in those rows to see whether the character is missing or is full-width |
| Is the count consistent with expectations | Use =LEN(A1)-LEN(SUBSTITUTE(A1,"-","")) to count how many times the character appears | When the count is inconsistent, first confirm that the search character in SUBSTITUTE matches the one in FIND |
| Is the extracted content complete | Compare the MID result with the original text and confirm there are no extra characters before or after | Check the length calculation for extraction, whether the minus one was missed or subtracted too many |
| Does case affect the result | Randomly spot-check rows containing letters | When case should be ignored, use SEARCH instead and recheck |
📊 Core Comparison
When looking for a character's position, I often hesitate between FIND and SEARCH. The main differences between the two are as follows.
| Comparison item | FIND | SEARCH |
|---|---|---|
| Uppercase and lowercase | Case-sensitive | Case-insensitive |
| Wildcard | Not supported | Support question marks and asterisks |
| Suitable scenarios | Fixed-format numbers, codes, and other exact-match items | Data with non-standard English words or text |
| Return value | Return character position number | Return character position number |
| When not found | Return error value | Return error value |
Both search backward from the starting position, so the way the second identical character is handled is essentially the same; you only need to choose one of them depending on the data.
❓ Frequently Asked Questions (FAQ)
1. FIND: Can it return the positions of all identical characters at once?
No. FIND returns only one position per call. To get all the positions, you need to nest it or use helper columns to record the first, second, and third occurrences separately. When the character appears only a few times, the nested approach is sufficient.
2. Once you've found the second one, how do you extract the content after it?
Use the position found as the starting position for MID or RIGHT. For example, to extract the date after the second dash, you can use =RIGHT(A1,LEN(A1)-FIND("-",A1,FIND("-",A1)+1)), and the result is 15.
3. Why does the official result show #VALUE!?
There are three common causes: the character you are looking for does not exist in the text, the start position is greater than the length of the text, or the symbol is full-width rather than half-width. First, use LEN to check the length of the text, then confirm whether the character really appears in the original text.
4. Character occurrence counts vary; how should they be handled uniformly?
First, use LEN minus the length after SUBSTITUTE to count the occurrences, then decide which occurrence to find based on that count. If the counts vary widely, consider using helper columns to record the positions step by step, which is easier to check than deeply nested formulas.
📝 Summary
In Excel, the third argument of the FIND function, start_num, is the key to finding the second or third occurrence of the same character: simply add 1 to the previous position to use as the starting position. Before you start, confirm whether the character exists and whether the search is case-sensitive; once you have the result, check each item against sample data. With these steps in hand, the problem of using Excel's FIND function to locate the second occurrence should be essentially solved.


