Solved

Excel 2007: Auto-populate from list

Posted on 2012-03-27
5
503 Views
Last Modified: 2012-03-31
Hi, I'd like to have formulas in column B of Sheet1 to automatically populate a list of cost center based on the BU specified in column A.  Please help.  Thanks!
Auto-populate.xlsx
0
Comment
Question by:JCJG
[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
  • 2
5 Comments
 
LVL 4

Expert Comment

by:ltsweb
ID: 37774739
Use Vlookup.  I will upload fix.  You have to switch the column orders in the Lookup sheet to use the function.

=VLOOKUP(B2,Lookup!$A:$B,2,FALSE)
Auto-populate-fix.xlsx
0
 

Author Comment

by:JCJG
ID: 37775119
This is not what I am looking for.  I'd like to be able to enter a BU in cell A2 and column B will be automatically populated all cost centers that belong to that BU.  For example, if I enter "A" in cell A2, column B will list 3 cost centers.  If I enter "B" in cell A2, column B will list 8 cost centers.  Thanks.
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 37786437
If you can use a helper column then it will make life very easy. See attached.
Copy-of-Auto-populate-1-.xlsx
0
 

Author Closing Comment

by:JCJG
ID: 37789950
Thanks for the simple but effective formulas!
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37790180
These are the functions used in the file

=IFERROR(INDEX(Lookup!B:B,Sheet1!C2+1),"")

How does Sheet1!C2+1 above use as the row number?

=IFERROR(MATCH(Sheet1!$A$2,OFFSET(Lookup!$A$1,Sheet1!C1+1,0,10000),0)+C1,"")

The match function
=MATCH(Sheet1!$A$2,range below previous value,0)

returns the distance of the next occurrence of that BU after the previous BU based on the "range below previous value"

The "range below previous value" can be calculated using the formula

OFFSET(Lookup!$A$1,Sheet1!C1+1,0,10000)

which returns a range starting C1+1 rows after A1 and is 10000 rows long.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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