Search function google sheets: A practical guide
Master search techniques in Google Sheets with LOOKUP, VLOOKUP, MATCH, INDEX, FILTER, and QUERY. Practical formulas, examples, and best practices for reliable data lookups.

In Google Sheets, search capabilities come from a family of functions: LOOKUP, VLOOKUP, HLOOKUP, MATCH, INDEX, FILTER, and QUERY. You can also use FIND/SEARCH for text-only searches. This guide demonstrates practical formulas for vertical, horizontal, and multi-criteria lookups, plus tips for handling missing data and duplicates. By the end, you’ll craft robust search workflows directly in Sheets.
Understanding search functions in Google Sheets
The phrase "search function google sheets" refers to a set of built-in tools that help you locate and retrieve data from datasets. Google Sheets provides a spectrum from simple vertical lookups to sophisticated multi-criteria queries. This section introduces the core concepts, starting with practical examples and guiding you on when to choose each approach. The goal is to empower you to select the most reliable method for your data layout and maintainable workflows.
=VLOOKUP(A2, Data!A:B, 2, FALSE)=INDEX(Data!C:C, MATCH(A2, Data!A:A, 0))=FILTER(Data!B:B, Data!A:A = A2)- VLOOKUP is great for straightforward lookups when the key is in the first column.
- INDEX/MATCH offers more flexibility, especially for non-contiguous ranges or when you want to search across rows and columns.
- FILTER handles multi-row results and can apply multiple criteria easily.
- Use FIND/SEARCH for text-only substring checks inside cells.
format
Steps
Estimated time: 20-40 minutes
- 1
Prepare your lookup table
Ensure your data is organized with a clear key column and result column. Normalize data types (numbers as numbers, text as text) and remove stray spaces. This makes lookups robust and reduces #N/A errors.
Tip: Use TRIM to clean leading/trailing spaces: =TRIM(A2) - 2
Choose a lookup approach
Decide between VLOOKUP for simple first-column keys, INDEX/MATCH for maximum flexibility, or FILTER/QUERY for multi-criteria searches. Consider future data layout changes when selecting the approach.
Tip: INDEX/MATCH is often safer when your lookup column might shift positions. - 3
Implement formulas and test
Write the lookup formula in a separate helper column or a dedicated sheet. Test with known values, then try edge cases like missing keys and duplicate keys.
Tip: Wrap with IFERROR to gracefully handle missing data. - 4
Handle errors and edge cases
Address #N/A with IFERROR, manage duplicates with UNIQUE or COUNTIF, and use FILTER for multiple results. Validate performance on larger datasets.
Tip: Document assumptions (e.g., unique keys) to help future maintenance. - 5
Scale and maintain
As datasets grow, prefer INDEX/MATCH or FILTER/QUERY with explicit ranges rather than whole-column searches for performance.
Tip: Convert static ranges to named ranges for readability.
Prerequisites
Required
- Required
- A dataset in Google Sheets containing a lookup columnRequired
- Basic familiarity with spreadsheet formulasRequired
Optional
- Optional: sample workbook for practiceOptional
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Find in sheetOpen the browser/Sheets find bar to locate text within the current sheet | Ctrl+F |
| Find next occurrenceAdvance to the next match in the active sheet | Ctrl+G |
FAQ
What is the difference between LOOKUP and VLOOKUP in Google Sheets?
LOOKUP is flexible and can work with sorted data, but it may return unpredictable results if the data isn’t organized as expected. VLOOKUP searches the first column and returns a value from a specified column; use INDEX/MATCH for more flexibility when the key isn’t in the first column.
LOOKUP is best for simple, often sorted data. VLOOKUP looks in the first column; INDEX/MATCH offers more flexibility when the layout shifts.
When should I use FILTER vs QUERY for searching data?
FILTER is ideal for returning multiple rows that meet simple criteria, while QUERY supports more complex, SQL-like queries and can join data, group results, or apply multiple criteria more succinctly.
Use FILTER for straightforward filters and QUERY for more complex criteria and data shaping.
How do I handle duplicates in lookups?
If duplicates exist, use UNIQUE to return unique results, or use a combination like FILTER with COUNTIF to inspect how many times a key appears before choosing a method to summarize results.
If there are duplicates, decide whether you want all matches or a single representative result, and use UNIQUE or a tailored INDEX/MATCH pattern.
Can I search across multiple sheets?
Yes, you can search across sheets using functions like INDIRECT to reference different sheets or by combining IMPORTRANGE for cross-file data. Be mindful of performance and data access permissions.
You can search across sheets with INDIRECT or IMPORTRANGE, but watch performance and permissions.
Is XLOOKUP available in Google Sheets?
As of 2026, Google Sheets does not have a native XLOOKUP function. Use INDEX/MATCH or the newer FILTER/QUERY patterns to achieve similar capabilities.
There isn’t a native XLOOKUP in Sheets yet; INDEX/MATCH or FILTER/QUERY are great alternatives.
What are common errors in lookups and how to fix them?
Common errors include #N/A for no match, #REF for invalid ranges, and #VALUE when data types don’t align. Fix by validating ranges, ensuring proper data types, and using IFERROR to provide fallback results.
Watch for #N/A or #REF, validate ranges, and ensure data types align; wrap with IFERROR for graceful fallbacks.
The Essentials
- Master core lookup functions: VLOOKUP, HLOOKUP, INDEX, and MATCH
- Use FILTER/QUERY for multi-criteria searches and dynamic results
- Prefer INDEX/MATCH for flexible, robust lookups
- Guard lookups with IFERROR and handle duplicates thoughtfully
- Plan for scale with explicit ranges and named ranges