+ Reply to Thread
Results 1 to 4 of 4

GoogleSheets: If statement within INDEX/MATCH

  1. #1
    Registered User
    Join Date
    12-10-2023
    Location
    NYC
    MS-Off Ver
    Office 365
    Posts
    2

    GoogleSheets: If statement within INDEX/MATCH

    Hi,
    I'm having trouble writing a formula that matches a name from one sheet where there is only one row person to another sheet with multiple rows per person. It is also contingent on their response to question.
    For example, I have two workbook sheets. In A, one person could be listed on multiple rows for every check in (different dates) they have. They may or may not have an arrest at each check in. I have calculated the number of days from their entrance into a program to their arrest (if they have one) for the check in on that date.

    In B, there is only one row per person and it aggregates things like the # of arrests.

    I want to create a column in B that brings in the number of days from the persons' start of a program until their first arrest. This requires getting the days from A, but only selecting the first time they had an arrest.

    This is the formula someone used for another column. I want to use something like this, but make it contingent upon whether they had an arrest. This only brings in the first line with their name, and they may not have had an arrest at that point. So, it shows as 0 days. If cell R4 is "Yes" (meaning they had an arrest, where should I put the IF(R4'"Yes") statement so that the formula only looks at the first date that they had an arrest?

    I hope this makes some sense. Nothing is working, but it seems like it should be simple.

    =ARRAY_CONSTRAIN(ARRAYFORMULA(IFERROR(INDEX('7 - Supervision'!$L$4:$L$100;MATCH(A4;'7 - Supervision'!$A$4:$A$100;0));"")); 1; 1)

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: If statement within INDEX/MATCH

    location NYC, is that New York City in the United States? If so it is odd that you are using semicolons as separators in a formula, I've never encountered that before, we usually use commas as separators. Could that be your part of your issue?
    Last edited by Sam Capricci; 12-11-2023 at 12:55 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    12-10-2023
    Location
    NYC
    MS-Off Ver
    Office 365
    Posts
    2

    Re: If statement within INDEX/MATCH

    Yes, I'm in New York City. This group that I'm creating these workbooks for uses Google Docs, because they don't have Excel. When I transferred the Excel file to Docs, it used semicolons.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,851

    Re: If statement within INDEX/MATCH

    As this is a GoogleSheets query, I am moving the thread out of the Excel section.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. If statement and index match
    By Vance44 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-19-2022, 12:56 AM
  2. [SOLVED] Index and Match with an AND statement?
    By Ron Purpura in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-18-2020, 04:53 PM
  3. Index Match with and If statement
    By SouthernMeMe in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-26-2019, 11:16 AM
  4. Index/Match with if/or statement
    By fjd9189 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2019, 12:25 PM
  5. [SOLVED] Using an IF statement with INDEX / MATCH
    By Fermented Reptile in forum Excel General
    Replies: 3
    Last Post: 02-13-2017, 08:47 AM
  6. index match with if statement
    By Per_s in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2016, 08:48 AM
  7. [SOLVED] If Statement (Match/Index)
    By usmanfarok in forum Excel General
    Replies: 12
    Last Post: 09-26-2012, 04:42 AM

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