Google Sheets: How do I identify text in a column of cells and use a relative cell for addition if specific text is found?

I am looking to make a function that finds if a name (string) is in a particular cell, and then add the cell 2 columns over every time that specific name is found.

I think im looking for a type of if statement that identifies if any of cells from x to y have a specific string, then adding all the cells 2 to the right of every time the string is identified.

Specifically, I am calculating run differential in a baseball stat keeping sheet. I currently have it set up so The columns of the game logs are as follows: WINNER, LOSER, RUN DIFFERENTIAL. I am looking to create a function which finds the run differential each time that specific team played.

Example: if Team A won by 9 in their first game, the name of their team would be in the WINNER column, followed by the team they beat in the LOSER column, and then finally followed by the RUN DIFFERENTIAL (+9) which shows how much Team A, the WINNER, beat TEAM B by, the loser.

I think the idea is to first locate where the team won and lost. A team’s name in the win column indicates a win and is easy to identify, so my initial idea was to give a simple if statement for wins (If name is found in this cell, ADD the run differential which is 2 rows over, meaning they won by that much) and then sum whatever that number comes to with all the times they’re found in the loser column and the run differential of all those times, which would be how much they’ve lost by.

post processing – Could someone help me identify what this piece of film might be used for

There’s one most likely choice for the origin and application of this transparency, and a second somewhat less likely one.

The likeliest (because of the tape on the edges) is that this was a transparency intended for use on an overhead projector (these were the commonest way to do presentations that involved writing or drawing, live for a large group), and would have been part of a presentation, either about spaceflight in general, about the Apollo program, or about Earth (from a NASA standpoint). This film piece would have been simply laid on the projection glass, and the optics of the projector would put it on the screen. Overhead projection is the most likely because by the 1970s, 4×5 format film projectors were already a rarity (35mm and medium format projectors were still common).

Next most likely is that it was a promotional piece, either intended for sale in a gift shop (to be viewed in a light box or incorporated into a lamp shade or similar, perhaps) or for direct sale to the public as part of NASA’s self-promotion programs.

It’s very unlikely that it’s an original, most tellingly because Apollo never carried large format camera gear — they carried Hasselblad cameras, shooting 6×6 cm format (56mm square actual image area) on 70mm double perforated film; if this were an original, it would be smaller than it is and have perforated edges. That makes it a copy, and copies weren’t generally used for science — but iconic images like that one went far to promote NASA and their scientific missions to the general public.

film – Could someone help me identify what this piece of filem might be used for

There’s one most likely choice for the origin and application of this transparency, and a second somewhat less likely one.

The likeliest (because of the tape on the edges) is that this was a transparency intended for use on an overhead projector (these were the commonest way to do presentations that involved writing or drawing, live for a large group), and would have been part of a presentation, either about spaceflight in general, about the Apollo program, or about Earth (from a NASA standpoint). This film piece would have been simply laid on the projection glass, and the optics of the projector would put it on the screen. Overhead projection is the most likely because by the 1970s, 4×5 format film projectors were already a rarity (35mm and medium format projectors were still common).

Next most likely is that it was a promotional piece, either intended for sale in a gift shop (to be viewed in a light box or incorporated into a lamp shade or similar, perhaps) or for direct sale to the public as part of NASA’s self-promotion programs.

It’s very unlikely that it’s an original, most tellingly because Apollo never carried large format camera gear — they carried Hasselblad cameras, shooting 6×6 cm format (56mm square actual image area) on 70mm double perforated film; if this were an original, it would be smaller than it is and have perforated edges. That makes it a copy, and copies weren’t generally used for science — but iconic images like that one went far to promote NASA and their scientific missions to the general public.

interactive – Lock focus on cell / Identify reason for loss of focus

The code at the end of this post is a snake game. It’s a Dynamic Graphics wrapped in an EventHandler that responds to arrowkeys. A ScheduledTask does the logic five times a second. I hit shift-enter to create it, and click the Graphics with my mouse (border turns orange) to start controlling it.

However, once the score hits 10, the Notebook is no longer focused on the cell (border no longer orange) and key input stops. Loss of focus also happens if I uncomment the bezier curve drawing — perhaps excess computation in the task is causing it. Something that continually directs focus to the particular cell, i.e. having FrontEnd`MoveCursorToInputField in updatetask is not desired; I want to prevent unintentional loss of focus. Functions to help track focus in the Notebook would be useful too.

ClearAll(food, snake, dir, lastdir, updatetask, empty, 
reserverandomlocation, reserve, score)
empty = Flatten(Table({i, j}, {i, 0, 9}, {j, 0, 9}), 1);
reserve(point_) := (empty = DeleteCases(empty, point); point); 
reserverandomlocation() := reserve@RandomSample(empty, 1)((1)); food =
  reserverandomlocation(); snake = {reserverandomlocation()}; dir = 
{Cos@#, Sin@#} &@((RandomInteger(3) (Pi))/2); lastdir = {0, 
  0}; score = 1; updatetask = 
 SessionSubmit(
  ScheduledTask(lastdir = dir; 
   With({new = (Mod(#, 10) &) /@ (snake((1)) + dir)}, 
    If(food == new, ++score; food = reserverandomlocation(), 
     AppendTo(empty, Last@snake); snake = Most@snake); 
    If(MemberQ(snake, new), dir = {0, 0}; TaskRemove@updatetask, 
     PrependTo(snake, reserve@new))), Quantity(.2, "Seconds")));
EventHandler(
 Dynamic@Graphics({{Blue, snake, Red, food, Black, 
      empty} /. {a_ /; NumericQ@a, b_ /; NumericQ@b} :> 
      Rectangle({a, b}, {a + 1, b + 1}), Black, 
    If(dir == {0, 0}, Text("dead", snake((1)) + {1/2, 1/2}), 
     Arrow({# - dir/3, # + dir/3} &(snake((1)) + {1/2, 1/2}))), 
    Text(ToString(score), food + {1/2, 1/2})(*,BezierCurve(#+{1/2,1/
    2}&/@#)&/@Split(snake,Norm(#-#2)(LessEqual)Sqrt(2)&)*)}), 
 MapThread(#2 <> "ArrowKeyDown" :> 
    If(Norm(# - lastdir) < 2, dir = #) &, {CirclePoints({1, 0}, 
    4), {"Right", "Up", "Left", "Down"}}))

P.S. how do you input grave in code? Certainly not like this &#96;.

html – How to identify different handlebar templates?

I have several html files in my project wich are templates to email messages, like email verification, password reset, etc…

I need to precompile these files and use them in the right place, for example, the email verification template must be sent in the registration function. The problem is how do i identify the templates to use them, given that i dont know from wich type they are? How can i create some kind of identifier for the templates?

normalization – How do I identify functional dependencies and normalize a table based on the attributes?

I’m having trouble identifying the combination of attributes which make up Functional Dependencies(FDs) of a particular table. While I understand how Normalization process works when given the FDs, I’m unable to translate and identify FDs for a given table.

I’ve been tasked to create a database of a company which tracks all expenses of sales/packages etc. Naturally that means storing Customer information for the company to identify all consumers.

CREATE TABLE Customers (
    id        integer primary key,
    address   text not null,
    name      text not null,
    email     text unique not null,
    phone     text unique not null,
    unique(name, address)
);
    

I’ve chosen to represent the info for the customer table as such, given that each phone number and email is uniquely tied to the customer. The unique constraint allows for multiple people from the same household address to be present in the table.

I want to see if I can normalize this table further, however I am unable to identify the attributes to determine the FDs needed.