0
votes

I want to look at a column and return the Nth Non-blank value. For the most part, I will only want to return the first 15 non-blank values.

The below question has an answer that almost works for me, but I can't figure out how to modify the formula:

How to get nth non-blank column in Excel

The formula finds the 3rd to last non blank value in a column:

 =INDEX(A1:A202,AGGREGATE(14,6,ROW(A1:A202)/(A1:A202<>""),3))

I thought the modification would be easy to just find the 3rd value, but I can't seem to figure it out. Can someone please help me modify this and help explain to me what this formula is doing?

Thanks

2

2 Answers

2
votes

If you have Excel 365 and if your data is in column A and N is in cell B1, try the following:

=INDEX(FILTER(A:A,A:A<>""),B1)

enter image description here

NOTE:

The INDEX() function can accept a dynamic drop down formula just like a column of cells.

1
votes

Please try this formula.

=INDEX(Data,SMALL(IF(Data<>"",ROW(Data)-MIN(ROW(Data))+1),C1))

Data is the column range from which you want to return the nth non-blank value. You can replace the name with a hard-coded address.

C1 = holds the value for n.

The formula is adapted from ExcelJet where it's advertised as an array formula (confirm with Ctl + Sift + Enter) but on my Excel 365 it works as a normal formula.