Find
Share
Explore

icon picker
Find

Formula: Find()
Category: Collections
search-folder.svg
Find()
Allows you to find the position of a chosen value
Or, put otherwise...
Hey Coda, can you tell me where in a list a certain value is?

Find() has two required parameters:
needle.svg
Needle

Find(Needle, Haystack)

This is the value you want to find within the list ("Haystack").

hay.svg
Haystack

Find(Needle, Haystack)

This is the list or string in which you want to search for the needle.

Find() also has three optional parameters:
quick-mode-on.svg
StartAt

Find(Needle, Haystack, StartAt, IgnoreCase, IgnoreAccents)

The position you want to start from. Defaults to 1.
s.svg
IgnoreCase

Find(Needle, Haystack, StartAt, IgnoreCase, IgnoreAccents)

Whether you want to ignore text case. Defaults to "false".
language-skill.svg
IgnoreAccents

Find(Needle, Haystack, StartAt, IgnoreCase, IgnoreAccents)

Whether you want to ignore accents. Defaults to false.

Find has two main use-cases...

Finding The Position of a Word, Letter, or String

There are many formulas to help you identify whether or not a word or string of characters is within a body of text. ContainsText(), for example, will tell you whether or not a word itself is in a body. But Find() will tell you:
Whether or not that word is in the text
Where in the text that word begins
Let’s take for example the paragraph above. Try typing words into the text-box below to find the position of words.
a
Ignore Case
Your word is at position 7 in the text
If your word was found in the text-body, Find() will return the first position within the text where it is found but will not provide any other data.
Further notes on Find():
For example, if you type in the letter a to the box above, Find() will return the number = 7. Try it out above and watch the actual result of Find() populate here →
7
Find() counts every single character within text including spaces, so the letter a first appears after the 5 letters in the word “there” and the space after it.
If Find() does not find any words/strings that match your Needle, it will return the result of -1.

Find The Position of an Item Within a List

Find() is extremely useful and shines when you want to find the position of an item in a list as opposed to the position of text within a body. Let’s learn by looking at three practical use-cases for Find() that you can use in your docs today.

1. Finding and Deleting Duplicates in a Table

Find() can be useful when used to identify
duplicate values
within a table, as it assists you in actually deleting them.
Click around into the column formulas below to see how Find() is used to identify duplicates and then view how the red button is able to delete them from the table in one action.
Delete Duplicates Below

Name
Find() to identify duplicates
Is Duplicate?

2. Automatic Conditional Formatting


3. Auto-Numbering of Groups

Find() can help you auto-number groups of similar things within a table. For example, take the table of Invoices below. Click into the gray column below to view how the Invoice number is automatically generated and unique for each company
Company
Invoice Number
Amount
Find
Nike
2
Invoice #1
$10,000.00
1
Invoice #2
$3,654.00
2
Starbucks
3
Invoice #1
$4,000.00
1
Invoice #2
$1,254.00
2
Invoice #3
$1,325.00
3
Apple
3
Invoice #1
$346.00
1
Invoice #2
$8,745.00
2
Invoice #3
$2,346.00
3



Done
Done
Done



Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.