+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 Macros based off Data Validation list to populate rows

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    DSM
    MS-Off Ver
    Excel 2007
    Posts
    5

    Excel 2007 Macros based off Data Validation list to populate rows

    So I am new to working with macros (I need things dumbed down for me lol)

    I am working on an "interview questionare"

    What I am working on for work is SHOW rows or populate a ROW (that is currently hidden with a question on it) based off of a cell that has a data validation list with YES and NO.

    For instance, if I have a cell C35 with a data validation list of YES and NO I need it to "show" the hidden row 37 that has an additional question if the answer is NO.

    If the answer is YES, I would like it to stay hidden. Is this possible? And if so, how do I customize it for other similar situations on the same questionaire. I am clueless when it comes to macros and getting them to run off of an answer with data validation. To be honest, I don't even clearly understand how to get it where I need it. I have SEVERAL questions like this. Some need to populate MULTIPLE rows. I have done my research and tried my best to edit other macros that are similar, but they just aren't working for me. PLEASE HELP!

  2. #2
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Excel 2007 Macros based off Data Validation list to populate rows

    Can you post a sample workbook?

    What do you mean by "data validation list"? Do you have comboboxes, listboxes, etc.? Are they form controls, ActiveX controls?

    You need to provide more information before the question can be answered.

  3. #3
    Registered User
    Join Date
    09-24-2012
    Location
    DSM
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel 2007 Macros based off Data Validation list to populate rows

    I guess I am not sure what it is considered (new lol) When excel, I created a drop down from data validation - selected LIST and inserted "yes" "No" for the options.

    I am attaching an example now.

    What i am looking for on this example is for box c35 - if it says YES I need row 37 to stay hidden, but if you were to select "no" on c35 it would SHOW row 37. Right now i have it grouped to manually expand if needed.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Excel 2007 Macros based off Data Validation list to populate rows

    See the attached workbook.

    I put the following code in the sheet module where the data is.

    Please Login or Register  to view this content.
    I also changed how the dropdowns are populate. I assigned cells K30, K31 and K32 as the source for the list. I did this to give the user the ability to select a blank value. The way the dropdown was in the original file had it so the cell started blank but once the user selected Yes or No they then had to use the delete key to reset the cell to blank.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-24-2012
    Location
    DSM
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel 2007 Macros based off Data Validation list to populate rows

    Ok that worked WONDERFUL. Now my question is pretty dumb, but say I need to do this for similar situations, how do I either ADD TO the macro for another question, or add an additional macro? And last one I promise How do I do "ranges" for populating MULTIPLE rows based off of the yes or no?

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Excel 2007 Macros based off Data Validation list to populate rows

    Another way

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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