How to Take Function in Excel
Learn multiple Excel methods to take (extract) portions of a range or array using the new TAKE function and proven legacy techniques—with step-by-step examples and business-ready applications.
How to Take Function in Excel
Why This Task Matters in Excel
Imagine you receive a month-end sales dump containing 50 000 rows of transactional data. You only need the last seven days, the first three product columns, or perhaps the middle section representing a specific region. Manually deleting the surplus rows and columns is tedious, error-prone, and risky, especially when the raw data is refreshed every morning. The ability to take—that is, quickly extract—just the part of a dataset you truly need is therefore indispensable.
In finance, analysts constantly pull the latest five closing prices from a ticker series to feed into a volatility model. Supply-chain managers must isolate the first 10 urgent orders for daily pick-lists. HR teams may want to show only the newest hires on a dashboard. Marketing departments often need the top N performing campaigns for executive summaries. Across industries, the theme is the same: large tables are the norm, and stakeholders seldom require all of it at once.
Excel excels at on-the-fly data reshaping—filtering, sorting, summarising—without altering the original source. Knowing how to “take” rows or columns dynamically means your reports update themselves as soon as new data flows in. Miss this skill and you end up with manual copy-paste routines that break dashboards, delay decisions, and undermine confidence in your spreadsheets. Master it, and you will integrate seamlessly with Power Query, PivotTables, and dynamic charts, creating end-to-end workflows that are robust, auditable, and almost maintenance-free.
Best Excel Approach
With Microsoft 365 and Excel 2021, the most efficient way to grab a slice of a range is the new TAKE function. TAKE is a member of the dynamic array family, so one formula spills the requested rows or columns without helper columns or complicated Ctrl + Shift + Enter keystrokes.
Why is TAKE often the best?
- It is readable—you can tell at a glance that the formula extracts the first or last N rows.
- It is dynamic—change the underlying range size or the N value and the result expands or contracts automatically.
- It works natively with 2-D arrays, unlike FILTER which always operates on rows first.
- It avoids the volatilities that OFFSET can introduce and the nested complexity of INDEX + SEQUENCE combinations.
Prerequisites: Excel for Microsoft 365, Excel 2021, or Excel for the web. Older versions will need alternate techniques shown later.
Syntax:
=TAKE(array, [rows], [columns])
Parameter guide:
- array – the source range or spilled array you want to slice.
- rows – optional; positive N takes the top N rows, negative N takes the bottom N rows.
- columns – optional; positive N takes the left N columns, negative N takes the right N columns.
When you supply both rows and columns, Excel executes the row slice first, then the column slice.
Alternative modern approach (for left or right columns only):
=CHOOSECOLS(array,1,2,3)
Legacy fallback for older Excel (extracting last N rows):
=INDEX(array,ROWS(array)-N+1):INDEX(array,ROWS(array))
Parameters and Inputs
-
array (required)
‑ Type: range reference, spilled range, or array constant.
‑ Preparation: ensure there are no blank rows inside if they would break dependent calculations. -
rows (optional)
‑ Type: integer, positive or negative.
‑ Positive value N returns the first N rows; negative returns the last N.
‑ Zero returns no rows—useful inside IF statements when you want to suppress output. -
columns (optional)
‑ Type: integer, positive or negative, same sign logic as rows.
‑ If omitted, TAKE returns all columns.
Input validation tips
- Guard against N exceeding the dimensions of array by wrapping N in MIN or MAX.
- If array is empty, TAKE returns
#CALC!. Manage this with IFERROR. - Non-numeric rows or columns arguments trigger
#VALUE!. Use VALUE or INT to coerce text numbers.
Edge cases
- Array height or width of one: requesting “last five rows” on a one-row array simply returns that row—TAKE gracefully truncates excess.
- Supplying both rows and columns as zero returns a zero-by-zero array. Excel displays nothing, which can be confusing if you expect headers.
Step-by-Step Examples
Example 1: Basic Scenario – Grab the First Five Rows
Suppose sheet “Data” holds daily website traffic:
[Data!A1:D15]
A: Date | B: Visitors | C: PageViews | D: Conversions
You need only the first five days for a quick spot check.
- Click cell F2 on the same sheet or a new sheet.
- Enter:
=TAKE(Data!A1:D15,5)
- Press Enter. Excel spills a 5-row × 4-column range in F2:I6.
- Format the Date column (F) as Short Date.
Why it works: rows parameter is 5 (positive), so TAKE selects the top five rows. No columns parameter means “return all columns”. Whenever new rows appear at the bottom of [A1:D15], this first-five slice remains unchanged—exactly what you want for top-N checks.
Variations
- Change 5 to a cell reference [H1] so business users can adjust the sample size.
- Add a columns argument of 2 to take only the Date and Visitors columns:
=TAKE(Data!A1:D15,5,2)
Troubleshooting
- If the spill range overlaps existing data, Excel shows a spill error. Delete or move whatever blocks F2’s spill area.
- If you see
#VALUE!, verify the rows argument is numeric.
Example 2: Real-World Application – Dynamic Rolling 7-Day Sales
A sales dashboard must always show the last seven days of figures even as new data pours in. Raw table [Sales!A1:F10000] has columns: Date, SKU, Qty, UnitPrice, Channel, Region.
Steps:
- Convert [A1:F10000] into an Excel Table named
tblSales. Tables automatically expand when data is appended. - In sheet “Dashboard”, cell B5, enter:
=TAKE(tblSales,-7)
- Excel outputs the last seven rows across all six columns. Link your chart’s data series to this spilled range (e.g., use the
=Dashboard!$B$5#syntax). - Apply conditional formatting: highlight Qty greater than 100 in green, below 20 in red. The formatting rules update automatically as TAKE’s spill area shifts.
- Add slicers for Channel and Region. Because charts reference the dynamic spill, slicer filters flow straight through—no extra formulas needed.
Business impact: Daily reports auto-adjust—no human must edit ranges on Monday mornings. This reduces reporting lag, eliminates copy-paste errors, and scales indefinitely because TAKE recalculates in milliseconds even with 10 000-row tables.
Performance note: TAKE is non-volatile; it recalculates only when the precedent table changes, so dashboards remain responsive. Using OFFSET instead would mark the workbook volatile and trigger full recalcs on every change—noticeably slower on massive models.
Example 3: Advanced Technique – Extract the Middle Block for Quarterly Analysis
The finance department stores a four-year history of revenue by product in [Rng!B1:Z1461] (rows are days, columns are SKUs). For a quarterly review, analysts need the middle 90 days of the prior year and only the five highest-revenue SKUs (columns L to P).
We’ll use nested TAKE with SORT and SUM:
- Name the data block
RevenueMatrix. - Calculate total revenue per SKU in an adjacent helper row:
=SUM(RevenueMatrix)
- Rank SKUs and extract the top five:
=TAKE(SORTBY(RevenueMatrix, SUM(RevenueMatrix), -1), , -5)
Explanation:
- SUM returns a 1-D array of column totals.
- SORTBY reorders columns from highest to lowest revenue.
- The second TAKE argument is omitted (take all rows), third argument is ‑5, so we keep the rightmost five columns of the sorted array—those are the top five.
- Now slice rows: to capture the middle 90 days (roughly Q2), find the starting offset:
=LET(
data,TAKE(SORTBY(RevenueMatrix, SUM(RevenueMatrix), -1), , -5),
totalRows,ROWS(data),
start,INT(totalRows/2)-45,
TAKE(data, 90, )
)
After the LET definition, TAKE selects 90 rows starting mid-year. Because rows parameter is positive, we still grab from the top; therefore shift the array down by wrapping with DROPPING first:
=LET(
data,TAKE(SORTBY(RevenueMatrix, SUM(RevenueMatrix), -1), , -5),
totalRows,ROWS(data),
start,INT(totalRows/2)-45,
TAKE(DROP(data,start),90)
)
Professional tips:
- Use LET to store intermediate arrays—readability and calculation efficiency improve.
- Instead of hard-coding 90, reference a cell so business leads tweak the window length.
- Combine with LAMBDA to build reusable “TakeMiddle” custom functions for your team.
Edge cases: Ensure start never becomes negative when the dataset shrinks; wrap with MAX(start,0).
Tips and Best Practices
- Reference Tables, not raw ranges. Tables auto-resize, ensuring TAKE always includes incoming rows without editing formulas.
- Cell-driven N values. Point the rows or columns argument to a parameter cell so stakeholders can test scenarios quickly.
- Wrap with IFERROR for user-friendly blanks:
=IFERROR(TAKE(array,-N),"No data available") - Combine with SORT, FILTER, UNIQUE to build end-to-end pipelines (e.g., FILTER first, then TAKE the top 3).
- Avoid volatile OFFSET unless necessary. TAKE recalculates only when source data changes, making models faster.
- Use the spill operator (#) in charts and data validation lists so the dependent ranges track TAKE’s dynamic output.
Common Mistakes to Avoid
- Using a negative N on the wrong dimension. Remember negative rows picks from the bottom; negative columns picks from the right. Mixing them up yields unexpected slices. Double-check sign direction.
- Hard-coding source ranges. If your dataset grows, fixed [A1:D100] will miss new rows. Convert to Tables or use whole-column references ([A:D]) when practical.
- Overlapping spill ranges. Placing a TAKE formula where downstream data already occupies the spill area causes
#SPILL!. Clear the obstructing cells or move the formula. - Ignoring zero-length results. Supplying rows value of zero or referencing a parameter cell that turns zero can make dashboards look broken. Trap with IF or display “No results”.
- Assuming TAKE exists in older Excel. Workbooks shared with colleagues on Excel 2016 will break. Provide backward-compatible formulas or use alternative methods discussed below.
Alternative Methods
When TAKE is unavailable or unsuitable, choose from these techniques:
| Method | Version Support | Pros | Cons | Sample Formula |
| — | — | — | — | — |
| INDEX with SEQUENCE | 2019+ | Works in 2-D, dynamic | Longer syntax | excel =INDEX(array,SEQUENCE(N),) |
| OFFSET with COUNTA | 2007+ | Familiar, easy to read | Volatile, slower | excel =OFFSET(A1,COUNTA(A:A)-N,0,N,4) |
| FILTER with ROW criteria | 365/2021 | Powerful row conditions | Rows only, no column slice | excel =FILTER(array,ROW(array) > ROWS(array)-N) |
| CHOOSECOLS / CHOOSEROWS | 365/2021 | Targeted left/right picks | Separate functions for rows vs columns | excel =CHOOSECOLS(array,1,2) |
| Power Query | All desktop | No formula limits, big data | Requires refresh steps | N/A (GUI) |
When to use each
- INDEX + SEQUENCE: need compatibility with Excel 2019 but still want dynamic arrays.
- OFFSET: quick ad-hoc models where volatility is acceptable.
- FILTER: row logic based on criteria rather than position.
- Power Query: ETL pipelines, millions of rows, or automated data cleansing outside worksheet formulas.
Migration strategy: Store TAKE formulas in helper cells. If sharing with older Excel, wrap them in IFERROR and offer an INDEX alternative in nearby hidden columns. Educate recipients on enabling Office Scripts or Power Query for more permanent solutions.
FAQ
When should I use this approach?
Use TAKE when you must display only the first/last N rows or columns, or a precise rectangular slice, and you want the result to refresh automatically as the source range changes. Ideal for rolling windows, top-N dashboards, and any situation where presentation layers must remain compact.
Can this work across multiple sheets?
Yes. Point the array argument to a sheet-qualified reference like Sheet2!A1:D1000 or to a named range that resides on another sheet. The spilled result appears on the formula’s sheet; changes in the source sheet recalculate instantly.
What are the limitations?
TAKE cannot skip rows (e.g., take every second row) and cannot pick non-contiguous columns unless combined with CHOOSECOLS. It also offers no built-in criteria filtering—that’s FILTER’s domain. And users on Excel versions earlier than 2021 will not have TAKE at all.
How do I handle errors?
Wrap TAKE inside IFERROR or, better, test inputs first:
=IF(N>0, TAKE(array,-N), "Enter positive N")
For spill errors, move obstructing data or convert it into a Table.
Does this work in older Excel versions?
No. Excel 2019 and earlier lack TAKE. Use INDEX + SEQUENCE or OFFSET instead, or migrate the workbook to Microsoft 365.
What about performance with large datasets?
TAKE is highly efficient; it runs in linear time proportional to the slice size, not the full array. Avoid volatile OFFSET and ensure you reference Tables so Excel recalculates only affected rows. For very large datasets (hundreds of thousands of rows), consider Power Query to stage data before it reaches the grid.
Conclusion
Being able to take precisely the rows or columns you need—automatically, dynamically, and readably—turns sprawling datasets into tidy, decision-ready views. The new TAKE function simplifies what once required intricate INDEX or volatile OFFSET tricks, improving workbook performance and maintainability. Integrate TAKE with Tables, SORT, and FILTER, and you have a modern, powerful toolkit for any analyst’s workflow. Practice the examples, experiment with parameter cells, and explore the alternative methods to ensure your skills translate across Excel versions. Master this task, and you will slice through data challenges with speed and confidence.
Related Articles
How to Take Function in Excel
Learn multiple Excel methods to take (extract) portions of a range or array using the new TAKE function and proven legacy techniques—with step-by-step examples and business-ready applications.
How to Show the 10 Most Common Text Values in Excel
Learn multiple Excel methods to list the 10 most frequent text values—complete with step-by-step examples, business use cases, and expert tips.
How to Abbreviate Names Or Words in Excel
Learn multiple Excel methods to abbreviate names or words with step-by-step examples and practical applications.