Locating specific empty data gaps in dense financial models is a common, frustrating hurdle for analysts. While tracking standard funding sources is straightforward, identifying precisely where allocations remain open requires advanced logic. Mastering the formula to find the Nth blank cell grants users unparalleled visibility into scheduling bottlenecks. However, one key stipulation is that this technique relies on modern dynamic arrays like FILTER and SMALL. In federal grant tracking pipelines, this logic successfully identifies open funding quarters. Below, we outline the exact formula syntax and step-by-step logic to automate this search in your worksheets.
In data analysis, financial modeling, and project management, tracking gaps in data is often just as important as analyzing the data itself. Whether you are identifying missing milestones in a project timeline, locating empty slots in a staff roster, or auditing a spreadsheet for incomplete records, you may find yourself needing to pinpoint the exact location of blank cells in a specific row.
While finding the first empty cell in a row is relatively straightforward, finding the N-th blank cell (e.g., the 2nd, 3rd, or 5th empty cell) requires a more advanced formula strategy. Depending on your version of Excel, you can solve this using either a modern dynamic array formula or a traditional Ctrl+Shift+Enter (CSE) array formula.
In this guide, we will explore both methods in detail, break down how the formulas work under the hood, discuss how to handle relative versus absolute column positions, and address edge cases like cells containing formulas that return empty strings.
Before we jump into the formulas, let's visualize the scenario. Imagine you have a row of weekly project tracking data running from column A to column J (row 2). Some weeks have updates (numbers or text), while others are left blank (indicating no progress or skipped sessions).
| Column A | Column B | Column C | Column D | Column E | Column F | Column G | Column H | Column I | Column J |
|---|---|---|---|---|---|---|---|---|---|
| Active | [Blank] | Active | Active | [Blank] | Active | [Blank] | Active | Active | Active |
In the row above:
Our goal is to construct a formula that allows us to input any value for N (e.g., 2) and automatically receive either the column index (5) or the actual cell address (e.g., $E$2) of that N-th blank cell.
If you are using Excel 365 or Excel 2021, you have access to dynamic array functions like FILTER. This makes the formula cleaner, easier to read, and eliminates the need for complex array key-combinations.
To find the absolute column index of the N-th blank cell in the range A2:J2, use the following formula:
=INDEX(FILTER(COLUMN(A2:J2), A2:J2=""), N)
(Note: Replace N with a cell reference containing your target number, such as L2, or hardcode a number like 2.)
COLUMN(A2:J2): This generates an array of the absolute column numbers for the specified range: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.A2:J2="": This evaluates each cell in the row to see if it is empty, returning an array of Boolean (TRUE/FALSE) values. For our table, it outputs: {FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE}.FILTER(...): The FILTER function filters the column numbers generated in Step 1 based on the TRUE values from Step 2. It returns only the column numbers where the cell is blank: {2, 5, 7}.INDEX(..., N): Finally, the INDEX function retrieves the value at the N-th position of the filtered array. If N = 2, it extracts the second item in the filtered array, which is 5 (Column E).If you are using an older version of Excel, you won't have access to the FILTER function. Instead, you must use a traditional array formula combination of SMALL, IF, and COLUMN.
=SMALL(IF(A2:J2="", COLUMN(A2:J2)), N)
Crucial Step: Because this is a legacy array formula, you must press Ctrl + Shift + Enter instead of just Enter after typing it. If done correctly, Excel will automatically wrap the formula in curly braces: {=SMALL(IF(A2:J2="", COLUMN(A2:J2)), N)}.
IF(A2:J2="", COLUMN(A2:J2)): This checks if each cell in A2:J2 is empty. If a cell is blank (TRUE), it returns its column number. If it is not blank (FALSE), it returns FALSE. The resulting array looks like this: {FALSE, 2, FALSE, FALSE, 5, FALSE, 7, FALSE, FALSE, FALSE}.SMALL(..., N): The SMALL function ignores logical values like FALSE and evaluates only the numbers. It ranks the remaining numbers in ascending order: {2, 5, 7}. It then returns the N-th smallest value. If N = 2, the second smallest value is 5.The formulas above return the absolute column number of the spreadsheet (where Column A = 1, B = 2, C = 3, etc.). However, what if your data range doesn't start in Column A?
Suppose your range is D2:M2. If the first cell in your range (D2) is blank, the absolute column index returned will be 4. If you want the formula to return the relative position within your selected range (i.e., treating D2 as column 1), you need to offset the column numbers.
=INDEX(FILTER(COLUMN(D2:M2) - COLUMN(D2) + 1, D2:M2=""), N)
=SMALL(IF(D2:M2="", COLUMN(D2:M2) - COLUMN(D2) + 1), N)
By subtracting COLUMN(D2) (which is 4) and adding 1 to the array of column numbers, you normalize the scale so that Column D becomes 1, E becomes 2, and so on.
While knowing the column index number is useful, you might need to output the actual cell reference to quickly jump to or inspect the blank cell. You can achieve this by wrapping your matching formula inside the ADDRESS function.
=ADDRESS(ROW(A2), INDEX(FILTER(COLUMN(A2:J2), A2:J2=""), N))
The ADDRESS function requires two primary arguments: row_num and column_num.
ROW(A2) dynamically passes the current row number (which is 2).ADDRESS(2, 5) translates these coordinates into the standard cell reference: $E$2.If you ask Excel to find the 5th blank cell in a row that only contains 3 blank cells, your formula will return a #NUM! error. To prevent this visual clutter, wrap your formula in an IFERROR statement:
=IFERROR(INDEX(FILTER(COLUMN(A2:J2), A2:J2=""), N), "No such blank cell")
There is a technical difference in Excel between a truly empty cell and a cell that contains a formula returning an empty string (e.g., =IF(X2="", "", "Data")).
="" condition (as shown in our main formulas) will count both truly empty cells and cells containing formulas that evaluate to an empty string. This is usually the desired behavior."", replace the condition with the ISBLANK function:
=INDEX(FILTER(COLUMN(A2:J2), ISBLANK(A2:J2)), N)
Choose the formula that best fits your workflow and Excel environment:
| Goal | Excel 365 / 2021 Formula | Legacy Excel Formula (CSE) |
|---|---|---|
| Get Absolute Col Number | =INDEX(FILTER(COLUMN(Range), Range=""), N) |
=SMALL(IF(Range="", COLUMN(Range)), N) |
| Get Relative Position | =INDEX(FILTER(COLUMN(Range)-COLUMN(FirstCell)+1, Range=""), N) |
=SMALL(IF(Range="", COLUMN(Range)-COLUMN(FirstCell)+1), N) |
| Get Cell Address | =ADDRESS(ROW(Range), INDEX(FILTER(COLUMN(Range), Range=""), N)) |
=ADDRESS(ROW(Range), SMALL(IF(Range="", COLUMN(Range)), N)) |
By leveraging these formula techniques, you can easily automate data validation, audits, and pipeline structures within your Excel worksheets, turning manual auditing tasks into dynamic, error-free models.
Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.