TAKE
Short answer
Last 12 months, always
TAKE(array, rows, [columns])
- Category
- Dynamic Arrays & Modern Excel
- Excel version
- 2024+
- Also searched as
- last 12 months formula, ltm excel, trailing twelve months, rolling sum without offset, drop header row, drop function
What it returns
TAKE returns a set number of rows or columns from the start or end of an array. A positive count takes from the start. A negative count takes from the end. TAKE(x, 1, -12) on a row of monthly figures returns the last twelve months.
DROP is its mirror. It returns everything except a set number of rows or columns. DROP(x, 1) removes the first row, DROP(x, -1) the last. Its syntax matches: DROP(array, rows, [columns]).
If you ask TAKE for more rows or columns than exist, it returns what there is, with no error. Ask for zero, or drop everything, and you get #CALC! for an empty result.
Arguments that matter
| Argument | Required | What it does |
|---|---|---|
array | Yes | The block to cut from. A P&L row, a Table, a spilled range. |
rows | Yes | How many rows to keep. Positive from the top, negative from the bottom. For a single-row array, use 1. |
columns | No | How many columns to keep. Positive from the left, negative from the right. Leave it out to keep every column. |
The sign carries the meaning. 12 is the first twelve, -12 the last twelve. Getting it wrong gives a valid number for the wrong months, which is worse than an error.
On a row of months, put the count in columns and 1 in rows. A count in rows against a one-row array returns the whole row, because the array has only one row to give.
In a financial model
Rolling windows are the core use. LTM revenue, trailing three-month average churn, the last six months of cash burn: each is “the last N periods up to the close date”. TAKE expresses that directly.
The combination is FILTER then TAKE. FILTER keeps the months on or before the last closed period, reading the date header that date headers are real dates requires. TAKE keeps the last twelve of what is left. Move the close date input forward a month and the window moves with it.
That replaces OFFSET, which the play on avoiding volatile functions flags. OFFSET recalculates on every change anywhere in the workbook, so a model full of OFFSET-based LTM cells slows down as it grows. TAKE and FILTER recalculate only when their inputs change.
DROP handles the cleanup end. System exports arrive with a header row and a grand total at the bottom. DROP(DROP(x, 1), -1) removes both, so the data feeds a SUMIFS or GROUPBY without double-counting the total. If the file comes in by formula through IMPORTTEXT, skip_rows can drop the header at load and one DROP takes off the total.
Worked example
An income statement tab IS with months across row 10 from D to BK, month-end dates from Jan-22 to Dec-26. Actuals run through the last closed month, and forecast fills the rest. An input LastClose holds 31 Jul 2026.
LTM revenue for row 12:
=SUM(TAKE(FILTER(IS!$D12:$BK12, IS!$D$10:$BK$10 <= LastClose), 1, -12))
FILTER returns Jan-22 to Jul-26, 55 months. TAKE keeps the last twelve, Aug-25 to Jul-26. SUM adds them. Change LastClose to 31 Aug 2026 and the window shifts to Sep-25 to Aug-26.
| Header | … | Jun-26 | Jul-26 | Aug-26 | Sep-26 |
|---|---|---|---|---|---|
| Row 12 | … | 410 | 425 | 440 (fcst) | 455 (fcst) |
| In FILTER | … | Yes | Yes | No | No |
| In TAKE | … | Yes | Yes | No | No |
A trailing three-month average, same structure:
=AVERAGE(TAKE(FILTER(IS!$D12:$BK12, IS!$D$10:$BK$10 <= LastClose), 1, -3))
And DROP on a pasted trial balance export on tab TB_Raw, header in row 1, grand total in the last row:
=DROP(DROP(TB_Raw!A1:.E3000, 1), -1)
The trim reference A1:.E3000 stops at the last used row, so the total row is always the last one, and the outer DROP removes it. Trim references need Microsoft 365. In Excel 2024, point DROP at a Table instead.
Old way vs new way
The legacy LTM used OFFSET to slide a twelve-column window:
=SUM(OFFSET(IS!$D12, 0, MATCH(LastClose, IS!$D$10:$BK$10, 0) - 12, 1, 12))
The new version:
=SUM(TAKE(FILTER(IS!$D12:$BK12, IS!$D$10:$BK$10 <= LastClose), 1, -12))
OFFSET is volatile and its width and offset arguments are hard to audit. A reviewer reads the TAKE version left to right: these months, up to the close, the last twelve.
Where it breaks
LTM equals the total of every month on the row. The count went into rows: TAKE(x, -12) on a one-row array returns the whole row. Fix: TAKE(x, 1, -12), with the count in columns.
LTM shows the first twelve months of history. The count is positive, so TAKE took from the start. Fix: use -12 to take from the end.
LTM looks low in the first year of the model. Fewer than twelve months exist up to the close, and TAKE returns what is there without an error. Fix: test the width, IF(COLUMNS(window) < 12, NA(), SUM(window)), inside a LET.
LTM includes forecast months. The formula used TAKE(IS!$D12:$BK12, 1, -12) with no FILTER, so it took the last twelve columns of the grid, all forecast. Fix: filter on the close date before taking.
TAKE returns #CALC!. The FILTER inside returned nothing, because LastClose is earlier than the first header or holds text, or the count is zero. Fix: validate LastClose against the header range in the check row.
DROP removes a real data row. The export had no total row this month, or two blank rows trailed it. Fix: test the last row’s label before dropping, or remove the total in Power Query, where the step is explicit.
TAKE or DROP returns #NAME?. The file opened in Excel 2021 or earlier. Fix: if the model must travel, use INDEX(row, n-11):INDEX(row, n), which is not volatile and works everywhere.
Related functions
- FILTER. The first half of every rolling window: keep only closed periods before taking.
- SORTBY. Rank first, then TAKE the top ten. The standard largest-variances table.
- SEQUENCE. Builds the date header that FILTER tests against.
- TRIMRANGE. Trims empty rows from a raw paste so DROP knows where the total row is.
- CHOOSECOLS. Picks named positions rather than a block from one end.
- XMATCH. Finds the close month’s position when you need the count for a legacy INDEX range.
- OFFSET. What TAKE replaces for rolling windows. Volatile, so avoid it in large models.
