+ Reply to Thread
Results 1 to 17 of 17

Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

  1. #1
    Registered User
    Join Date
    04-22-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    I'm working on a football statistics spreadsheet. I have multiple nested IF statements in what I'll call "WS1" for the first worksheet, which set up such that if any player's number between 1 and 99 is entered the player's name automatically appears in the column to the right of the player number (from a list in another worksheet). Let's use passing as an example. In the first quarter I could have several quarterbacks attempting passes and completing them. So, in WS1, Column A has the player number, Column B automatically enters the player's name (corresponding to the player's number), Column C has whether or not a pass was attempted - either a "1" for an attempt or it remains blank if the play was a running play (which is entered in another set of columns further to the right), and if the pass is completed a "1" is entered in Column D. Lets say that five (5) different quarterbacks attempt a pass in the first quarter and each completes at least one pass. Lets say QB A was 4 of out of 6. So, Rows 2 - 7 would have a line entry for QB A, on a play-by-play basis. For example, Row 2 would show an attempt in Col. C for QB A and it was complete, so there's a "1" in Col. D. After 6 passes, QB A gets hurt and QB B enters the game. QB B goes 3 out of 5. So, Rows 8 - 12 would be used, on a play-by-play basis during the game, to enter QB B's results. (Sorry to be so lengthy, but I had to set up the dilemma I now face).

    On a separate worksheet (what I'll call "WS2") I want to show that, for the first quarter, QB A was 4 out of 6 - not on a row-by-row basis as is entered during the game in WS1, but on a single row. In other words, on WS2 I want to see the following on one row (say, Row 2) in Cols. A-D: Col. A - QB A's player number, Col. B - QB A's name, Col. C - QB A's total passes attempted, Col. D - QB A's passes completed. Similarly, on the next row down I want to show that QB B was 3 out of 5 - in the same fashion as QB A's totals on the row immediately above.

    In essence, WS2 is a summary page for the row-by-row (which corresponds to play-by-play) data entered in WS1.

    Keep in mind that any player numbered 1 through 99 could attempt and complete a pass (unrealistic, I know, but bear with me). Theoretically, I could have 99 players attempting and completing passes (again, unrealistic), so I need to be able to total perhaps multiple quarterbacks' results (or even a running back or a wide receiver throwing a pass).

    Is there an easy way to do this? Do I need a macro (which I'm not adept at writing) or could something like VLOOKUP (with which I'm vaguely familiar) do this? (If I can figure out how to do this it will unlock doing the same sort of thing for rushing, receiving, etc. statistics)

    Any help would be VERY, VERY, VERY MUCH appreciated. (Again, sorry for the message length.)

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    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
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Registered User
    Join Date
    04-22-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    Thank you for the swift response! As requested I have attached a sample file. What I need is for what appears on the tabbed sheet "Offense Summary" in Quarter No. 1 to populate automatically from the row-by-row data on the tabbed sheet "Offense".

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    This should get you started. In 'Offense Summary'!C4 enter this formula and copy across to d4 and down to fill in the stats for QB repeat for the other quarters selecting each quarter in turn.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-22-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    Unfortunately, that didn't work. If I change the number in "Offense" cell B3 to Player Number 6 (Justin Snyder), Cell B4 in "Offense Summary" goes blank, i.e., it doesn't pick up that different player's name or his attempts. That is the problem. "Offense Summary" needs to automatically populate from "Offense" no matter what player number is entered in Col. B of "Offense" during the game.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    I got the sheets reversed. I have no idea where you are going to get values from. The whole workbook seems backwards and overly complicated.

    Maybe someone who follows football will be able to understand what it is you want.

  7. #7
    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: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    where is WS1 worksheet in your file? One recommendation I would make is to replace that IF statement in cell C3 of the "offense" sheet to a vlookup with =VLOOKUP(B3,Lists!A:B,2,FALSE).
    Your post #1 really doesn't match your attachment. I am spending a lot of time trying to go back and forth between your post and the sheet to try to figure out what you need.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  8. #8
    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: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    I'd also get rid of the multiple IF statement in sheet "offense" in cell L3 and use another vlookup instead and drag that down...
    =VLOOKUP(K3,Lists!A:B,2,FALSE)
    I'd also replace the same ones in P3 and X3 of "offense" and drag down those too. Both of those formulas look like they reference the same lists in the "lists" sheet so the same vlookup can be used but change the K3 to P3 and X3 respectively.

  9. #9
    Registered User
    Join Date
    04-22-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    Sambo kid:

    I'm sorry my original post was difficult to decipher. Attaching the file will, hopefully, make sense. I did as you suggested in Cell C3 by deleting the nested IF's with this formula: =VLOOKUP(B3,Lists!A:B,2,FALSE) and that works the same as the long IF's statement (but much shorter a formula to enter!) I can do likewise in columns K and P as you suggested.

    By looking at the file are you now able to comprehend what I'm trying to accomplish by automatically the cells in "Offense Summary" from the row-by-row data in "Offense"?

  10. #10
    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: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    Not really. I think you are trying to populate the Offense sheet from the Lists and Offense Summary sheets but based on the formulas that remain I am having difficulty seeing that. For example, this formula in Offense cell D3 =IF(B3>0,1,"") doesn't make sense to me under the column heading of "Att." I assume the title designates attempted passes. But I see no relevance between B3 in that sheet and blank or 1.
    Perhaps a couple of examples in another sheet OR just give one example here of a player and what should populate for them and where it should be and come from.

  11. #11
    Registered User
    Join Date
    04-22-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    The formula in cell D3 is simply to automatically the entering of a "1" in the pass attempt column (this is a spreadsheet that is being populated by a statistician during the course of a game, so the fewer the entries the better and that formula eliminates having to type a "1" in cell D3 if a player number is entered in B3).

    Perhaps a different explanation would help. In the attached file, in cells B4 through D8 in "Offense Summary" I need to summarize the results from cells C3 through E24 in "Offense". If I had 5 quarterbacks attempting passes in the first quarter - meaning each one will have so many attempts and so many completions in "Offense" - I need to total those attempts and completions on a per-player basis in "Offense Summary". Is that any better of an explanation or does that just make it worse? (This is proving harder to explain than I first thought, obviously.)

  12. #12
    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: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    so if I understand you correctly, the offense summary is the sheet you need. So try this formula in cell C4 of the offense summary =SUMIF(Offense!$C$3:$C$24,'Offense Summary'!$B4,Offense!D$3:D$24), this one in D4 for completions =SUMIF(Offense!$C$3:$C$23,'Offense Summary'!$B4,Offense!E$3:E$24) and drag both down.
    then for quarter two, advance the ranges to these... =SUMIF(Offense!$C$29:$C$53,'Offense Summary'!$B10,Offense!D$29:D$53) and =SUMIF(Offense!$C$29:$C$53,'Offense Summary'!$B10,Offense!E$29:E$53)
    You can make similar adjustments for ranges for Receivers and Rushing.
    hope that helps.

  13. #13
    Registered User
    Join Date
    04-22-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    Unfortunately, SUMIF won't do what I need. To test whether the SUMIF formulas worked I changed two of player 2's passes (Rows 17 and 18) to number 50 (whose player name in the Lists worksheet is 50) to see if "Offense Summary" would populate automatically by adding a fifth quarterback in the first quarter (i.e., number 50) and 50 didn't show up.

  14. #14
    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: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    I used the sumif statements in the sheets where you had values (I assume) hand entered and the values came out the same. Are you looking to have the QB list in Offense Summary populate based on the quarterbacks listed in the Offense sheet? if so I don't recall you mentioning that before. I can't really tell what you want so like newdoverman, I'm going to bow out, maybe someone else can help you.
    To help the next person, post a sheet with what you have, what you want and how you got it, give specifics about what you have, where the formulas or needed formulas are and populate examples with what you want - actual data always helps. Less clutter is always better at least for problems - otherwise more data makes those looking at the example spend a lot of time trying to find what they need. Good luck.

  15. #15
    Registered User
    Join Date
    04-22-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    OK, thanks for the inputs. I appreciate the attempt. To answer the question, yes, I need quarterback names to populate automatically from "Offense" into "Offense Summary", too, along with the total attempts and total completions for each respective quarterback. (If you're not a football fan it is probably not as obvious what I'm trying to do; a football fan might more intuitively understand what I'm attempting to do . . . but maybe not.)

  16. #16
    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: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    Well I kept interrupting watching NFL red zone to try to help you but just wasn't following what you need.

  17. #17
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Summing Row-by-Row Data From One Worksheet into a Single Row in Another Worksheet

    This formula should work there:
    Please Login or Register  to view this content.

+ 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. Macro to copy data from multiple worksheet cells in to a single Master worksheet
    By thunt13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2015, 03:24 PM
  2. Replies: 1
    Last Post: 11-14-2014, 04:02 AM
  3. [SOLVED] VBA code to copy certain cells from one worksheet into a single row in another worksheet
    By thedefense in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2013, 06:11 PM
  4. [SOLVED] copy data from cells in a column on one worksheet to a single cell in another worksheet
    By jpsnickers in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2013, 07:02 PM
  5. Store summary calculations for each worksheet in a single worksheet
    By rgilpatric in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-07-2012, 04:45 PM
  6. [SOLVED] Hiding a single row in a worksheet dependng on a cell change in another worksheet
    By bean29 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2012, 06:55 AM
  7. Replies: 0
    Last Post: 07-04-2005, 02:05 PM

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