Solved

Why array formula is not working to list the cells that have either text or values in them?

Posted on 2014-07-18
7
222 Views
Last Modified: 2014-07-18
I am trying to find the 1st, 2nd, 3rd, 4th, 5th, 6th and 7th cells that have either text or data in them from G10:M10.

The array formula I am using is giving me an error:
INDEX($G$10:$M$10;SMALL(IF($G$10:$M$10<>"";COLUMN($G$10:$M$10)-COLUMN($G$10)+1);1))

Please see attached.
Non-Blank-Cells.jpg
Non-blank-cells.xlsx
0
Comment
Question by:cssc1
7 Comments
 
LVL 23

Assisted Solution

by:NBVC
NBVC earned 125 total points
ID: 40205278
Are you confirming with CTRL+SHIFT+ENTER?

If that is not the problem, then:

Should you be using the semi-colon ( ; ) or the comma ( , ) ?

If I use semi-colon, I get error, but not if I use comma.

Try:

=IFERROR(INDEX($G$10:$M$10,SMALL(IF($G$10:$M$10<>"",COLUMN($G$10:$M$10)-COLUMN($G$10)+1),ROWS($C$10:$C10))),"")

confirmed with CTRL+SHIFT+ENTER not  just enter, then copy down to get remaining.
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40205294
You need to use commas instead of semi-colons.

However, if you want to see the nth items listed, enter this array formula in cell C10 and then copy and paste down to C16:
=IFERROR(INDEX($G$10:$M$10,SMALL(IF($G$10:$M$10<>"",COLUMN($G$10:$M$10)-COLUMN($G$10)+1),ROW()-9)),"")

-Glenn
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40205321
Wait a minute...do you want to see the cell addresses containing the non-blank values?  That would be different...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 21

Assisted Solution

by:Ejgil Hedegaard
Ejgil Hedegaard earned 125 total points
ID: 40205345
The row reference 1 should be in front of Small
=IFERROR(INDEX($G$10:$M$10,1,SMALL(IF($G$10:$M$10<>"",COLUMN($G$10:$M$10)-COLUMN($G$10)+1),B10)),"")
B10 is the search number 1 to 7 for the Small function, see file

Besides that, my delimiter in formulas are semi-colon.
That depends on country.
Non-blank-cells.xlsx
0
 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 250 total points
ID: 40205391
If you wanted the addresses of the cells with values returned, use this array formula instead ([Ctrl]+[Shift]+[Enter]):
=IFERROR(ADDRESS(10,6+SMALL(IF($G$10:$M$10<>"",COLUMN($G$10:$M$10)-COLUMN($G$10)+1),ROW()-9)),"")

Example workbook updated.


-Glenn
EE-Non-blank-cells.xlsx
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 250 total points
ID: 40205394
Ejgil wrote:
Besides that, my delimiter in formulas are semi-colon.
 That depends on country.

Good point; I forgot about that.

-Glenn
0
 

Author Closing Comment

by:cssc1
ID: 40205615
Wow, You guys got it!

Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Troubleshooting a Worksheet Graphic 8 25
Excel 2016 - Black cell borders 11 27
Update As Well As Add 6 38
Help Updated Qtr 2 10
Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now