Excel多条件提取行求助:筛选未来的Walk Up类事件
Got it, let's tackle this problem step by step. You're trying to pull specific rows from your first Excel sheet into the second—only the "Walk Up" events that haven't expired yet. Transpose and VLOOKUP aren't great fits here because they're designed for single-value lookups, not filtering entire rows. Here are three solid solutions depending on your Excel version and needs:
Solution 1: Dynamic Array Formula (Excel 365/2021+)
This is the simplest and most efficient method if you're running a modern Excel version with dynamic array support.
Assume your first sheet is named Events, with:
EventTypein column BEvent Datein column C- All event data spans columns A to Z (adjust this range to match your actual data)
In cell A1 of your second sheet, enter this formula:
=FILTER(Events!A:Z, (Events!B:B="Walk Up")*(Events!C:C>TODAY()), "No valid Walk Up events")
How it works:
Events!A:Zspecifies the entire range of data you want to pull(Events!B:B="Walk Up")filters for rows where the event type is "Walk Up"*(Events!C:C>TODAY())acts like an AND condition, adding the filter for dates later than today- The final
"No valid Walk Up events"is optional—it shows this text if there are no matching rows
The formula will automatically spill all matching rows into your second sheet, no need to drag or fill manually.
Solution 2: Legacy Array Formula (Older Excel Versions)
If you're using an older Excel version without dynamic arrays, you'll need a combination of INDEX, SMALL, and IF functions.
In cell A2 of your second sheet, enter this formula, then press Ctrl+Shift+Enter (not just Enter) to run it as an array formula:
=IFERROR(INDEX(Events!A:A, SMALL(IF((Events!$B:$B="Walk Up")*(Events!$C:$C>TODAY()), ROW(Events!$A:$A)), ROW(A1))), "")
How to use it:
- After entering the formula with Ctrl+Shift+Enter, drag it down the column to pull all matching rows
- Repeat the process for other columns (adjust
Events!A:AtoEvents!B:B,Events!C:C, etc., for each column)
How it works:
IF((Events!$B:$B="Walk Up")*(Events!$C:$C>TODAY()), ROW(Events!$A:$A))collects the row numbers of all matching eventsSMALL(..., ROW(A1))grabs the first, second, third, etc., matching row number as you drag downINDEX(Events!A:A, ...)pulls the value from the corresponding row in column AIFERROR(..., "")hides error messages when you drag past the last matching row
Solution 3: Power Query (Best for Large/Updatable Datasets)
If you have a lot of data, or need to refresh the filtered list regularly, Power Query is the way to go—it's visual and avoids messy formulas.
Step-by-step:
- Go to the Data tab in Excel
- Click Get Data > From File > From Workbook, then select your current Excel file
- In the Navigator window, select your
Eventssheet and click Load To > Only Create Connection, then check "Enable load" and click OK - Go back to the Data tab, click Queries & Connections, right-click your
Eventsquery, and select Edit to open the Power Query Editor - In the editor:
- Click the dropdown arrow on the
EventTypecolumn, uncheck "Select All", then check "Walk Up" and click OK - Click the dropdown arrow on the
Event Datecolumn, hover over Date Filters > After, then select "Today" from the options (or enterDate.From(DateTime.LocalNow())manually if needed)
- Click the dropdown arrow on the
- Click Close & Load To, choose "Existing Worksheet", select cell A1 of your second sheet, and click OK
Now, whenever your source data updates, just right-click the table in your second sheet and select Refresh to update the filtered list.
Notes to Avoid Issues
- Make sure your
Event Datecolumn is formatted as a Date in Excel, not plain text—text dates won't work with theTODAY()comparison - Adjust column references (like
B:B,C:C) and data ranges (likeA:Z) to match your actual sheet structure - For the legacy array formula, avoid using entire column ranges (like
A:A) if your sheet has a lot of unused rows—use a specific range likeA2:A1000to improve performance
内容的提问来源于stack exchange,提问作者Daniel Finke

