Selecting rows based on condition and then totalling cells?
Hi there!
Here is my problem:
I need vba code that will search for cells in, say, column A, for cells with the word "Name." Then, from those rows, find the numbers that are located in column E. I then need to get the sum of those numbers and have that plugged into a cell somewhere (I don't know where yet. Just somewhere on the spreadsheet where I can put a label on it).
I have the details listed below. I just wanted to get my final question in the top of this.
I have two spreadsheets in a workbook. They are set up to track scores for a competition being held in my company. One is a detailed spreadsheet that tracks all of the activities, teams, points, etc. The other is a spreadsheet that will be emailed to the different teams so that they can see how everyone is doing. That one pulls information from the first spreadsheet, but leaves out a lot of details they do not need to see. I have already set up a macro to move the information from the first spreadsheet to the second. It is just a copy and paste macro.
This is where my problem starts. I need the grand total for each team calculated automatically, on command. All of the teams are listed in the same table and there is one listing for each point-scoring thing they do. So there can be 30 rows for a particular team (if they have done a lot) and another team could have 3 rows (If they aren't trying very hard). Also, the table will be updated with more records regularly, so I can't just set an area to copy from or anything like that. I believe that I need a formula that will search for cells in, say, column A with "Name." Then, from those rows, find the numbers that are located in column E. I then need to get the sum of those numbers and have that plugged into a cell somewhere (I don't know where yet. Just somewhere on the spreadsheet where I can put a label on it). I don't know how to write this code. Can anyone help me? Or, if you have a better suggestion, I would love to hear it! Thank you!
you don't need VBA for
you don't need VBA for this... just add a pivot table