简体   繁体   中英

Excel Find the Nth Non Blank Value in Column

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

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)

在此处输入图像描述

NOTE:

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM