+ Reply to Thread
Results 1 to 4 of 4

Auto populate column based on drop list, auto populate other columns

  1. #1
    Registered User
    Join Date
    03-14-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003 + 2007
    Posts
    10

    Auto populate column based on drop list, auto populate other columns

    I am still a newbie trying to fly when I can hardly even crawl yet.

    This code on it's own works fine to populate Master SHEET Columns D,E,F,G based on what is pasted into Master SHEET Column B.

    Ref: CODE A
    Please Login or Register  to view this content.
    This code on it's own partially works in that a selection from the drop list will get data just not the correct data, it gets all data.

    Ref: CODE B
    Please Login or Register  to view this content.
    What should it do?

    The drop list should have a blank line when selected this clears the sheet below Row 1 so as to preserve headers.

    When you select from the drop list the macro should find the column of data related to that selection
    and automatically populate Master SHEET Column B (CIDR).

    With Master SHEET Column B (CIDR) populated trigger the population of Columns D,E,F,G

    Example:
    If AF - AFGHANISTAN is selected this should only get Column A from SHEET Data and populate Master SHEET Column B (CIDR).

    The now populated Master SHEET Column B (CIDR) should trigger Ref: CODE A which should now populate Master SHEET Columns D,E,F,G

    Attached workbook is using Ref: CODE B as a filter function in module 1 manually run for now so as to not interfere with macro in Master SHEET
    Attached Files Attached Files
    Last edited by wolfen; 02-27-2012 at 10:43 PM.

  2. #2
    Registered User
    Join Date
    03-14-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003 + 2007
    Posts
    10

    Re: auto populate column based on drop list then auto populate other columns

    I would really appreciate some help on this.

    OK I have abandoned Ref: CODE B and I have now tried using an offset array using a table.
    This does pull the correct data, however I also have 0 values which I need to figure out how to not have show.

    Not sure whether an AVERAGE IF statement will do it.

    Ref: CODE C
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by wolfen; 02-27-2012 at 02:52 PM.

  3. #3
    Registered User
    Join Date
    03-14-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003 + 2007
    Posts
    10

    Re: auto populate column based on drop list then auto populate other columns

    I think this is supposed to work but so far the best I have managed is errors Div 0 or Value.
    It is meant to average with the zero values removed.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-14-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003 + 2007
    Posts
    10

    Re: Auto populate column based on drop list, auto populate other columns

    Please Login or Register  to view this content.
    does not work So I have tried to break things down into stages to see what output is being given at each stage.

    Ref: CODE D
    Please Login or Register  to view this content.
    Ok Ref: CODE D gives an output with 0 values

    Ref: CODE E
    Please Login or Register  to view this content.
    Ok Ref: CODE E gives an output with 0 values

    Ref: CODE F
    Please Login or Register  to view this content.
    Ok Ref: CODE F gives an output with 0 values

    Ref: CODE E and Ref: CODE F giving an output with 0 values would be expected as Ref: CODE E uses 0 for FALSE otherwise output would show FALSE values.

    Step in any time and give a hand or feel free to just stand back and watch me bash my head against a wall.
    Last edited by wolfen; 02-28-2012 at 11:59 AM.

+ 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