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
224 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

828 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