+ Reply to Thread
Results 1 to 2 of 2

HELP: function identify cell of a certain criteria and subtract it from a specific cell

  1. #1
    Registered User
    Join Date
    02-09-2016
    Location
    Leamington Spa, England
    MS-Off Ver
    Office 365
    Posts
    1

    HELP: function identify cell of a certain criteria and subtract it from a specific cell

    Background
    I have been working on a simple net expected point success metric for NFL games, and I have run into a technical problem.


    I want to subtract the score at play_i from the score at the half


    Equation 1
    Score_half_j-Score_ij


    Picture 1 shows the relevant variables. The following variable names are marked in yellow: the points before a play_ij(ptso, where i is the play id and j is the half id), points at half-time_j (schalf, where j is given by halfid), and the relative point metrics (RELSCO, the data is this column is just to illustrate what I aim to achieve)

    Picture 1: screenshot

    IQ3SLrQ.jpg



    I have an unique indicator for the half (j), I have an dummy for last play of the half and its corresponding score.


    Question


    My issue is the following:


    Since the length of a half (in terms of the amount of attempts by an offence) differs from half to half, I need to make excel/stata identify the correct half time score to include in equation 1 (Score_half_j)

    I.e. I need the software to scan the column for half time scores and find one with the same half id as play i.


    I think this would involve some kind of lookup/find function with IF commands for the half ids being equal. However, as I am not an expert on excel I do not how to approach this issue.


    It would be great to hear some input on how I might solve this.


    Kind regards,


    Magnus

    Share
    Quick reply to this message Reply Reply With Quote Reply With Quote Multi-Quote This Message

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,605

    Re: HELP: function identify cell of a certain criteria and subtract it from a specific cel

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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. [SOLVED] subtract from a specific amount but keep total in same cell?
    By michaelDDW in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-03-2015, 08:37 PM
  2. Replies: 2
    Last Post: 03-05-2015, 10:58 PM
  3. Identify specific text strings in a cell?
    By mnidevil in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-18-2014, 01:55 PM
  4. [SOLVED] Macro to Identify Largest Value Across Columns, Then Subtract Value Held in Other Cell
    By mab1284 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2014, 09:46 AM
  5. Replies: 2
    Last Post: 07-19-2011, 05:47 PM
  6. Excel 2007 : Subtract if a cell meets criteria
    By dmartinez in forum Excel General
    Replies: 3
    Last Post: 07-19-2010, 02:27 PM
  7. Replies: 1
    Last Post: 07-17-2008, 01:21 PM

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