How to Organize Excel Rows by Office with a Drop-Down List
Question details
The user wants to dynamically organize and display employee rows into different sections based on a selected office location from a drop-down list.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Managing an employee directory or dataset where personnel need to be viewed by their assigned office, keeping in mind that office sizes change regularly.
- Observed behavior
- Users often attempt to use formulas to physically move rows into specific sections, but formulas can only display calculation results and filter data; they cannot physically relocate actual records.
Ensure your main employee data is formatted as an official Table (Insert > Table) so that any formulas or PivotTables you create will update automatically as office sizes change or new employees are added.
Create Office-Specific Views using the FILTER Function
Use the dynamic array FILTER function to display records based on a selected drop-down value without physically altering your master data.
Formulas cannot physically move data around your spreadsheet, but they can instantly extract and display data. The most efficient way to organize rows dynamically based on a drop-down list is by keeping one master table and using the FILTER function to create custom views.
Create your main employee table containing all records. Ensure there is a column dedicated to the 'Location' or 'Office' of each employee.
Select an empty cell where you want to choose the office (e.g., cell F1). Go to the Data tab, click Data Validation, choose 'List', and input your office names.
In an empty area where you want the organized list to appear, enter the formula: =FILTER(A2:D100, B2:B100=F1, "No Employees found"). Replace the ranges with your actual data and location column.
Select a different office from your drop-down list in cell F1. The filtered rows will automatically update to display the employees for the selected office.

Group Employee Records by Office using PivotTables
PivotTables are perfect for grouping and summarizing data. You can instantly categorize all employee rows by their respective offices without writing complex formulas.
Physically Move Rows to Different Sheets using VBA Macros
If your goal requires the actual data to be cut from the master list and pasted into different sheets based on the drop-down list, you must use a VBA macro.
Effortlessly Organize Spreadsheet Data in WPS Office
WPS Spreadsheet provides powerful Data Validation, dynamic array functions like FILTER, and advanced PivotTable tools to easily organize and categorize your data dynamically.
- 1. Open Master Dataset: Open your master employee list in WPS Spreadsheet.
- 2. Create Location Drop-Down: Select the cell for your selector, go to the Data tab, and click Data Validation to create your location list.
- 3. Use FILTER Function: Type the =FILTER() function in an adjacent area to dynamically extract and display rows based on the selected location.
- 4. Or Use PivotTables: Alternatively, select your data and go to Insert > PivotTable to instantly categorize employees by office with zero coding.

Frequently Asked Questions
Can an IF formula physically move a row to another sheet?
No. Excel formulas, including IF statements, can only return values or arrays to the cells they are placed in. They cannot physically cut, copy, or move formatting and rows to other locations. You must use VBA macros or Office Scripts to actually move data.
Why is my FILTER function returning a #CALC! error?
The #CALC! error typically occurs when the FILTER function finds no matching records for the criteria selected in your drop-down list. You can fix this by adding the optional 'if_empty' argument to your formula, for example: =FILTER(A2:B10, B2:B10="New York", "No results").
How do I make the drop-down list update automatically when I add new offices?
Format your list of office locations as an official Table (Insert > Table), then reference that table column in your Data Validation settings. When you add a new office to the bottom of that table, the drop-down list will update automatically.
Will the drop-down formula filtering work if I send the file to someone else?
Yes, as long as the recipient opens the file in a modern spreadsheet program that supports dynamic array formulas (like WPS Spreadsheet or Excel 365), the drop-down filtering will work seamlessly without any modifications.




