Solved

Autofilling an array - excel

Posted on 2011-09-19
4
233 Views
Last Modified: 2012-05-12
Hi,
I'm looking for some help to produce an excel sheet that auto-fills out a table of contents depending on what i select in a data sheet.

My example is a list of fruit, I want to be able to choose which fruit I want in the data section, and have it auto-fill in the same order under contents with no spaces for the missing fields.

experts-autoarray.xlsx

Thanks!
0
Comment
Question by:WTC_Services
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 50
ID: 36564079
Hello,

You can do that if you add a helper column in  the table. Is that an option?

cheers, teylyn
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 500 total points
ID: 36564105
Put this formula in C4 and copy down

=IF(B4="yes",ROW(A1),"")

Then use this in F3 and copy down as far as you like

=IFERROR(INDEX($A$4:$A$8,SMALL($C$4:$C$8,ROW(A1))),"")

You can hide column C.

See attached

cheers, teylyn
experts-autoarray.xlsx
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36564141
You can also do this without a helper column if you want - the resulting formula is a little longer than teylyn's suggestion. In F3

=IFERROR(INDEX(A$4:A$100,SMALL(IF(B$4:B$100="Yes",ROW(B$4:B$100)-ROW(B$4)+1),ROWS(F$3:F3))),"")

confirmed with CTRL+SHIFT+ENTER and copied down the column - when you run out of entries you get blanks, see attached

regards, barry
27316564.xlsx
0
 

Author Closing Comment

by:WTC_Services
ID: 36564749
Thanks teylyn,

this worked great!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

690 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