Table of Contents
π Sample Data
Name | Position | Office | Age | Start Date |
---|---|---|---|---|
Raj | Manager | Mumbai | 35 | 01-01-2021 |
Sita | Developer | Delhi | 28 | 15-03-2022 |
Aman | HR Executive | London | 31 | 22-11-2020 |
Priya | Analyst | New York | 30 | 05-08-2019 |
β Step-by-Step: Create a Search Box in Excel
π Step 1: Open the Excel File
Open your Excel sheet that contains your data.
π§© Step 2: Enable the Developer Tab
If you donβt see the Developer tab:
- Go to
File > Options
- Click Customize Ribbon
- Check the box for Developer and click OK
Now youβll see a Developer tab in the Excel ribbon.
πΉ Step 3: Add a Search Input Cell
Letβs assume:
- You enter your search text in cell D6
- Your data starts from cell B9 (with names in Column B)
πΉ Step 4: Apply Conditional Formatting with Formula
- Select the data range where you want to apply search highlighting (e.g.,
B9:F12
) - Go to Home > Conditional Formatting > New Rule
- Choose βUse a formula to determine which cells to formatβ
- Enter this formula:
=AND(SEARCH($D$6,B9),$D$6<>"")
π‘ This formula highlights cells that contain the value typed in D6.
- Click Format > Fill > Choose a color
- Click OK to apply the rule.
π How It Works
SEARCH($D$6, B9)
checks if the cell in column B contains the keyword typed in D6.AND(... , $D$6<>"")
ensures that it only applies if the search cell is not empty.
β¨ Result
Now, whenever you type something like "Priya"
or "Developer"
in cell D6, the matching rows will be highlighted automatically, helping you quickly locate the data!
π‘ Extra Tips
- You can expand the formula to highlight entire rows or add filters for more control.
- Make your header bold and freeze it for easier navigation.