The Return non-blank rows formula stops working after 100 rows.

krii

New Member
Joined
Oct 28, 2022
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hello.

I'm trying to use the return non blank cells formula you get if you google to return only populated cells from a single column.

{=IFERROR(INDEX(Y$1:Y100;SMALL(IF(LEN(Y$1:Y100)>1;ROW(Y$1:Y100);"");ROW(A1)));"")}

This one works for 148 cells than does not return anything.

If i try to up the range to

{=IFERROR(INDEX(Y$1:Y1000;SMALL(IF(LEN(Y$1:Y1000)>1;ROW(Y$1:Y1000);"");ROW(A1)));"")}

It doesn't return anything at all.

Seems to be hitting some sort of a limit in excel I don't know about.

How do I fix this?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Could you please try the formula below:
Excel Formula:
{=IFERROR(INDEX(Y$1:Y$1000;SMALL(IF(LEN(Y$1:Y$1000)>1;ROW(Y$1:Y$1000));ROWS(A$1:A1)));"")}
 
Upvote 0
.. the return non blank cells formula you get if you google to return only populated cells from a single column.

{=IFERROR(INDEX(Y$1:Y100;SMALL(IF(LEN(Y$1:Y100)>1;ROW(Y$1:Y100);"");ROW(A1)));"")}
I don't think that was a good Google search result to look at if you are trying to return non-blanks. As well as eliminating blank cells, that also eliminates cells with a single character see column A below.
It is also not robust in that if you subsequently insert any new rows at the top of the sheet it will return more incorrect results - see my second mini sheet below.
I would suggest the formula shown in column B below as it addresses both of the issues mentioned above and also does not require the Ctrl+Shift+Enter confirmation.
Note that my formulas use comma separators so you would need to change to semicolons based on your original formula above.

22 11 29.xlsm
ABXY
1bbaa
2ghbbbb
3jjghgh
4kjkjj
51236kjj
6 kjkk
7 1236
8  kjk
9  1236
Non blanks
Cell Formulas
RangeFormula
A1:A9A1=IFERROR(INDEX(Y$1:Y100,SMALL(IF(LEN(Y$1:Y100)>1,ROW(Y$1:Y100),""),ROW(A1))),"")
B1:B9B1=IFERROR(INDEX(Y:Y,AGGREGATE(15,6,ROW(Y$1:Y$1000)/(Y$1:Y$1000<>""),ROWS(B$1:B1))),"")


See what happens to the original formula results if a new row is added at the top:

22 11 29.xlsm
ABXY
1
20aa
3kbbbb
41236ghgh
50jj
6 kjj
7 kjkk
8 1236
9  kjk
10  1236
Non blanks
Cell Formulas
RangeFormula
A2:A10A2=IFERROR(INDEX(Y$2:Y101,SMALL(IF(LEN(Y$2:Y101)>1,ROW(Y$2:Y101),""),ROW(A2))),"")
B2:B10B2=IFERROR(INDEX(Y:Y,AGGREGATE(15,6,ROW(Y$2:Y$1001)/(Y$2:Y$1001<>""),ROWS(B$2:B2))),"")
 
Last edited:
Upvote 0
Solution
Could you please try the formula below:
Excel Formula:
{=IFERROR(INDEX(Y$1:Y$1000;SMALL(IF(LEN(Y$1:Y$1000)>1;ROW(Y$1:Y$1000));ROWS(A$1:A1)));"")}
This doesn't return anything at all.
I don't think that was a good Google search result to look at if you are trying to return non-blanks. As well as eliminating blank cells, that also eliminates cells with a single character...
Yes this was my edit to it. As the range i'm running it on doesn't actually contain any empty cells. It's populated by a formula result that outputs "", which for the original version of it :
{=IFERROR(INDEX(A1:A5,SMALL(IF(NOT(ISBLANK(A1:A5)),ROW(A1:A5),""),ROW(A1))),"")}
didn't handle correctly.

I'll try your aggregate formula and see if it works. As it looks like it should handle it correctly
 
Upvote 0
Yep this works a lot better.

=IFERROR(INDEX(Y:Y,AGGREGATE(15,6,ROW(Y$1:Y$1000)/(Y$1:Y$1000<>""),ROWS(B$1:B1))),"")

Thanks!
 
Upvote 0
Yep this works a lot better.

=IFERROR(INDEX(Y:Y,AGGREGATE(15,6,ROW(Y$1:Y$1000)/(Y$1:Y$1000<>""),ROWS(B$1:B1))),"")

Thanks!
You're welcome. Thanks for the confirmation. :)
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,845
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top