+ Reply to Thread
Results 1 to 7 of 7

Auto-Fill names based on a Validation?

  1. #1
    aiwnjoo
    Guest

    Auto-Fill names based on a Validation?

    Spreadsheet attached;

    If a Managers name is selected in F3 it will then auto populate,

    D5, F5, H5 etc with the consultants within the Managers team based on information from Setup sheet.

    Is this possible with formulae, or is it macro time?

    Thanks,
    Attached Files Attached Files
    Last edited by aiwnjoo; 04-28-2010 at 02:01 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Auto-Fill names based on a Validation?

    No, I don't think it is macro time

    Try this:

    In I2 of Setup sheet, enter: =IF(H2='Team Overview (Breakdown)'!$F$3,COUNT($I$1:I1),"")

    and copy down to bottom

    then in say, G3 of the Team sheet enter: =MAX(Setup!I:I) (you can match font to background colour to hide it)

    Then in D5 enter:

    =IF(COUNTA($C$5:C5)+1>$G$3,"",INDEX(Setup_Consultants,MATCH(COUNTA($C$5:C5)+1,Setup!$I$2:$I$53,0)))

    copy that cell and then paste to each of the other cells in that row to populate.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Re: Auto-Fill names based on a Validation?

    Small correction to NBVC's post, I2 needs to be,

    =IF(H2='Team Overview (Breakdown)'!$F$3,COUNTIF($H$2:H2,H2),"")

    and this would be copied down.

    The formula was missing the first person under the manager.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Auto-Fill names based on a Validation?

    Thanks for catching that Dulanic,

    I just missed a +1...

    so formula should be:

    =IF(H2='Team Overview (Breakdown)'!$F$3,COUNT($I$1:I1)+1,"")


    Note: COUNT() is I think more efficient then COUNTIF()

  5. #5
    Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Re: Auto-Fill names based on a Validation?

    That would make sense too

  6. #6
    aiwnjoo
    Guest

    Re: Auto-Fill names based on a Validation?

    It works well guys, could you explain exactly what this does? Ive not worked with formula in that context before. Thanks

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Auto-Fill names based on a Validation?

    The formula in column I checks if the manager name in H is the one you selected in the TEAM sheet. If so, it adds 1 to the count of matches as you go down the list.

    The Max() formula, gives the last (largest) number returned which corresponds to the number of matches...

    This is used in the final formula to "error trap". I.e. if the number of boxes is more than the max, then return a blank instead of giving an error.

    For each box, a count is made of previously filled boxes, to determine what "box number" we are at... if we have a match of the corresponding "box" number in the Setup sheet, then the corresponding name (SetupConsultants column) to that number (from column I)

    You can use the formula Auditing tool, found in the Tools menu to step through the formulas.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1