Creating a list that filters out Blanks

Steeden87

New Member
Joined
Feb 8, 2018
Messages
6
Hello all,

I have been racking my brain for a few days trying to solve an issue with a spreadsheet that I am having.

There is a list generate by a formulas (From True/False) that returns the result, but I need it to filter out blanks and make a consecutive list. See an example below with the formula I am using.

y4TPUnw
y4TPUnw.jpg



I have tried using this Formula: =IFERROR(INDEX($A$2:$A$10,SMALL(IF(ISTEXT($A$2:$A$10),ROW($A$1:$A$9),""),ROW(A1))),"") - Found here: https://www.myonlinetraininghub.com/excel-remove-blank-cells-from-a-range

But, this formula only works for Data entered manually and not formulas as a column with a formula (Returning "") isn't counted as a blank cell.

Any suggestions to generate this without the blanks spaces would be greatly appreciated and would save my department within the Ministry of Education hours of time whilst generating reports having to manually sort this.

Thank you!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Say your data are in A2:A100 - to create a list without blanks in column B, beginning in B2, try

Array formula in B2 copied down
=IFERROR(INDEX(A$2:A$100,SMALL(IF(A$2:A$100<>"",ROW(A$2:A$100)-ROW(A$2)+1),ROWS(B$2:B2))),"")
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Last edited:
Upvote 0
For the same setup Marcelo described, an alternative is this version that doesn't require the Ctrl+Shift+Enter confirmation.

Code:
=IFERROR(INDEX(A$2:A$100,AGGREGATE(15,6,(ROW(A$2:A$100)-ROW(A$2)+1)/(A$2:A$100<>""),ROWS(B$2:B2))),"")
 
Upvote 0
Say your data are in A2:A100 - to create a list without blanks in column B, beginning in B2, try

Array formula in B2 copied down
=IFERROR(INDEX(A$2:A$100,SMALL(IF(A$2:A$100<>"",ROW(A$2:A$100)-ROW(A$2)+1),ROWS(B$2:B2))),"")
confirmed with Ctrl+Shift+Enter, not just Enter

M.


AMAZING!

Thank you both, it worked perfectly!

I really appreciate your help. I have been tasked with automating all the reports we do and I thought I had come to a dead end with this issue.

Thank you!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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