Excel formula to get non-blanks from a range - row by row

Js Smith

New Member
Joined
Jul 24, 2020
Messages
44
Office Version
  1. 2010
Platform
  1. Windows
Hi all!

I'm not able to find a suitable formula in google searches.

This is my fake data which could start in column B, X or anywhere else:

stuff1stuff2stuff3stuff4stuff5stuff6stuff7stuff8
Item1bItem2cItem2dItem2fItem2gItem3i
Item2b
Item1bItem2cItem2dItem2fItem2gItem3i
item3e
Item1bItem2cItem2dItem2fItem2gItem3i
Item1bItem2cItem2dItem2g


What I need is an excel formula to get non-blanks from a range - row by row so it looks something like this:

Item1bItem2cItem2dItem2fItem2gItem3i
Item2b
Item1bItem2cItem2dItem2fItem2gItem3i
item3e
Item1bItem2cItem2dItem2fItem2gItem3i
Item1bItem2cItem2dItem2g

Just for fun, the data could have a blank row so not sure how to work that out for error handling.

I've played around with this sort of formula
Excel Formula:
=IFERROR(INDEX($A$2:$A$10,SMALL(IF(ISTEXT($A$2:$A$10),ROW($A$1:$A$9),""),ROW(A1))),"")
but can't get it to do what I need.

There's loads of articles out there dealing with columns and with fairly clean data but not messy rows.

Thanks, in advance, for your guidance!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Also tried something like this but couldn't get it to work with a range, rather than the entire row

Excel Formula:
=IFERROR(INDEX(2:2,AGGREGATE(15,6,(1/(2:2<>""))*COLUMN(2:2),COLUMN(A1))),"")
 
Upvote 0

Forum statistics

Threads
1,215,159
Messages
6,123,348
Members
449,097
Latest member
thnirmitha

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