+ Reply to Thread
Results 1 to 5 of 5

Return Values from Spreadsheet based on 2 criteria

  1. #1
    Registered User
    Join Date
    08-11-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Office 365
    Posts
    5

    Arrow Return Values from Spreadsheet based on 2 criteria

    I have a workbook with a data tab, lookup tab, and goal tab. Based on the values in cell D2 on the lookup sheet, I’d like to return “Goal 1”, “Goal 2”, etc to match the number from D2 and return these values beginning in cell A4. Secondly, I want to return the values in the data table starting with the first letter in cell E2 (F) and count over the same number of columns as in D2 and return those values as well beginning in cell B4. The goal sheet shows what I’m trying to accomplish if I’ve not been clear. Thanks for your time.
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Return Values from Spreadsheet based on 2 criteria

    I'm concerned by your layout and I'm not sure what problem you're trying to solve but I suspect your data could be in a much more structured format. Having said that:

    Please Login or Register  to view this content.
    Copy those down as far as you need to go.

    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    08-11-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Return Values from Spreadsheet based on 2 criteria

    A little background might help, I suppose. I am hoping to build a solution that therapists can use to track data for special education students. I want it to be as automated as possible because they are busy with large caseloads. As odd as the layout is, I can't really control it because the data is populated by entries on a branched Google form. The form consists of a common section, a hidden section, and one section of questions (goals) for each student. In the associated spreadsheet, each question is a column header. I use the Google Query function to break out the data into separate worksheets for each student. It is these worksheets that I am looking for help with. Because the student goals can be very long, I list the full goal above the form responses and replace them in the breakout dataset with "Goal 1", "Goal 2", etc using the label argument in the query function. I am attaching the associated workbook from the Google form. In the workbook, there is a sheet for Wilma R._finished that shows what I'd like the worksheet to look like with minimal input from the therapists. Ideally, they'd only need to input data into cells A2, C2, D2, E2, F2 on the duplicated template. If you have the time to input some data into the form for Wilma Rios and look at the spreadsheet to work out a solution, I'd appreciate it.
    Attached Files Attached Files

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Return Values from Spreadsheet based on 2 criteria

    Sorry - I don't think I can help you. I still don't understand the requirements and it's practically impossible to achieve what you're looking for with just formulas because the varying number of goals can change the target cells for the values. You'll either need to find another format or accept that you're going to need to use macros.

    WBD

  5. #5
    Registered User
    Join Date
    08-11-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Return Values from Spreadsheet based on 2 criteria

    I was able to successfully produce the result that I want using a little trial and error. For a student with 3 goals, I placed this formula in cell A4:
    =transpose(query('Form Responses 1'!$A$1:$MZ$1,"select " & MID($E$2&"",1,10)& " label " & MID(E2&" ",1,2) & " 'Goal 1', " & MID(E2&" ",5,2) & " 'Goal 2'," & MID(E2&" ",9,2) & " 'Goal 3'"))

    It gives me the text Goal 1, Goal 2, and Goal3 in cells A4, A5, A6 respectively. It also gives the full text of each goal in cells B4, B5, and B6.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. To return values based on criteria
    By suji01 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-10-2020, 08:11 PM
  2. Return values based on multiple criteria
    By mmchaley in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-09-2020, 02:03 PM
  3. [SOLVED] Return several values based on 1 criteria
    By kenjcd in forum Excel General
    Replies: 8
    Last Post: 05-14-2019, 10:57 PM
  4. [SOLVED] Return Values based upon multiple criteria
    By frustrated in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-17-2016, 08:56 AM
  5. Return column values based on criteria
    By SalientAnimal in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2014, 10:55 AM
  6. matching values based on criteria and return values from another columns
    By lizard54 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 11:29 AM

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