+ Reply to Thread
Results 1 to 7 of 7

Extracting specific data from an XLS survey answer sheet

  1. #1
    Registered User
    Join Date
    10-03-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Thumbs up Extracting specific data from an XLS survey answer sheet

    Hi guys,

    I am a total XLS noob...I use tutorials to learn the most basic functions. Which is why I've come here for help on a very complex issue I have:

    I have a spreadsheet that has survey results for about 250 athletes. The spreadsheet has the names,birthdates,etc + answer to about 12 survey questions + other erroneous data. The 12 survey questions are all answered with "yes" "no" or "unknown". In the spreadsheet itself yes= 1, no= 0, unknown= -1.

    I want to make a macro that will go through this dataset, find anyone who answered "yes" (aka "1") to any of the 12 questions, select that person with all of their data, and put it on a new spreadsheet. I know I can sort the spreadsheet and do it manually, question by question, but the reason I'd like a Macro is because I want to reproduce this method in the future since I will be using this survey on thousands of more people.

    Is this something that seems doable??

    I seriously appreciate any and all help!!

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Extracting specific data from an XLS survey answer sheet

    hi, jsad, any chance to see sample workbook with original data and result you'd like to obtain

  3. #3
    Registered User
    Join Date
    10-03-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extracting specific data from an XLS survey answer sheet

    Hmmm....data might be sensitive, but I can make a similar sample spreadsheet. Let me get working on one and then upload. Thanks for the interest!

  4. #4
    Registered User
    Join Date
    10-03-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extracting specific data from an XLS survey answer sheet

    Okay I've made a sample sheet...the fields that are in yellow are the survey questions (I guess there were 9, not 12).

    So what I wanted to happen is: a macro selects all the people who have a "1" in any of the 9 questions, takes their entire row of info (name, gender, all 9 questions, all that random data afterwards) and puts them in a separate spreadsheet.

    Is this something feasible/possible?
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Extracting specific data from an XLS survey answer sheet

    hi, jsad, please check attachment, run code "test"
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-03-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extracting specific data from an XLS survey answer sheet

    Wow!! That was awesome, watersev!

    Is there any way to put all of the selected patients onto one spreadsheet, instead of on seperate sheets?

    Thank you SO much for your help.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Extracting specific data from an XLS survey answer sheet

    please check attachment, run code "test"
    Attached Files Attached Files

+ 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