06-15-2005, 06:22 PM | #1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
Yet Another Excel Thread
For my video game thread, I've got an Excel spreadshee that looks something like this.
I'm trying to create a separate sheet to tabulate scores, perhaps using COUNTIF, using a table like this: Name CoffeeWarlord 0 1 0 3 =COUNTIF(Games!F2:F204,A4) But I need to verify two things- if the name is the same and if the rank of the question is the same (freebie, bronze, silver, gold). Is there an easy way to do this with countif or a similar command. If that wasn't clear, I essentially, need to count up how many freebie, bronze, silver, and gold answers people made on a separate table. SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
06-15-2005, 06:50 PM | #2 |
High School Varsity
Join Date: Jan 2004
Location: Here
|
If I get what you're asking, and I might not, I think you just need an And() function in your countif.
countif(range,and(name,level)) for each name/level combo edit: now that I look at that, it won't work. Ignore me.
__________________
Now while I wasn't able to cut everyone I wanted to, I have cut a lot of you. - H.J.S. Last edited by mhass : 06-15-2005 at 06:52 PM. |
06-15-2005, 07:56 PM | #3 | |
lolzcat
Join Date: May 2001
Location: williamsburg, va
|
Unfortunately, I'm 99% sure you cannot do 'and' statements in excel... (without vbscript at least)...
What I would do is concatinate (sp?) the two in a 3rd field and use that in your countif...
__________________
Text Sports Network - Bringing you statistical information for several FOF MP leagues in one convenient site Quote:
|
|
06-15-2005, 08:42 PM | #4 |
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
I had the same idea as mhass, but the "and" won't work because your range will have two columns.
I'm not sure if wade meant that we can't do "and" statement at all in excel, or only in the countif. It's possible to do "and" in excel, just not in that function. I'd also use a concatenate(A2;B2) to create a new column that would have the player's name and the level of the question in one cell, then do the countif on four consecuive cells next to the name of the player in your other sheet... FM
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
06-15-2005, 08:46 PM | #5 | |
lolzcat
Join Date: May 2001
Location: williamsburg, va
|
yeah, i meant within a function .
__________________
Text Sports Network - Bringing you statistical information for several FOF MP leagues in one convenient site Quote:
|
|
06-15-2005, 09:10 PM | #6 |
Pro Rookie
Join Date: Feb 2003
Location: Raleigh, NC
|
I'll concur with FrogMan. It's not the most pretty, but the concatenation is a quick way to come up with a total. Basically, just have a column on sheet two with everybody's name in it, then put in a formula like
"=COUNTIF(Sheet1!c1:c100,"=Freebie"&A1)" where A1 is a player's name (in this example). |
06-15-2005, 09:12 PM | #7 |
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
NO NO NO!!! Forget what I said, my brain was turned off... 2 words
PIVOT TABLE!!! But you'll need headers on your columns... After that, it'll do everything by itself... Let me know if you need a walkthrough... FM
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
06-15-2005, 10:38 PM | #8 |
College Prospect
Join Date: Oct 2000
Location: The Flatlands of America
|
Rule number one in excel:
When in Doubt - PIVOT TABLE!!!!!!
__________________
Post Count: Eleventy Billion - so deal with it! |
06-15-2005, 11:57 PM | #9 |
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
Thanks for the help, guys. I have something new to look into tomorrow
SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" |
06-15-2005, 11:59 PM | #10 | |
Pro Starter
Join Date: Jul 2003
Location: South Bend, IN
|
Quote:
__________________
Hattrick - Brays Bayou FC (70854) / USA III.4 Hockey Arena - Houston Aeros / USA II.1 Thanks to my FOFC Hattrick supporters - Blackout, Brillig, kingfc22, RPI-fan, Rich1033, antbacker, One_to7, ur_land, KevinNU7, and TonyR (PM me if you support me and I've missed you) |
|
06-16-2005, 12:07 AM | #12 | |
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
Quote:
Yes, you can do "and"- it's pretty common. But what I'm asking can't be set up with "and" in conjunction with "countif" at least in any incarnation I can think of. Basically, because you'd be asking excel to be both an iterator and something that's just a simple counting function. SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" |
|
06-16-2005, 12:09 AM | #13 | |
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
Quote:
SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" Last edited by sterlingice : 06-16-2005 at 12:10 AM. |
|
06-16-2005, 12:19 AM | #14 | |
Pro Starter
Join Date: Jul 2003
Location: South Bend, IN
|
Quote:
__________________
Hattrick - Brays Bayou FC (70854) / USA III.4 Hockey Arena - Houston Aeros / USA II.1 Thanks to my FOFC Hattrick supporters - Blackout, Brillig, kingfc22, RPI-fan, Rich1033, antbacker, One_to7, ur_land, KevinNU7, and TonyR (PM me if you support me and I've missed you) |
|
06-16-2005, 09:36 AM | #15 | |
High School Varsity
Join Date: Jan 2004
Location: Here
|
Quote:
That's what I was trying to say. Make a column for each combination to the right of your answers. Use If(And( [Name Answ] = [Name Col], [Ques Level] = [Ques Col]), 1, 0). Then Sum your columns at the bottom. Put those sums in your results table.
__________________
Now while I wasn't able to cut everyone I wanted to, I have cut a lot of you. - H.J.S. |
|
06-16-2005, 09:44 AM | #16 |
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
PIVOT TABLE!!!!
FM PS: thanks for the kind words guys, appreciate it
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
06-16-2005, 12:18 PM | #17 | |
lolzcat
Join Date: May 2001
Location: williamsburg, va
|
What was that FM?
Good point actually...
__________________
Text Sports Network - Bringing you statistical information for several FOF MP leagues in one convenient site Quote:
|
|
06-16-2005, 12:59 PM | #18 | |||||||||||||||||||||||||||||||||||||||||||||
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
These are a neat feature I've never messed with before so I've got a couple of questions.
(I've decided to stop asking "Can I do this" = "Is there a way to do this in a way that doesn't result in a lot of pain") 1. Can I set the order of the columns above? I'd much rather it be "Bronze/Silver/Gold" 2. I can make a simple "total points" column based on the three columns. But what if I add a new type of trivia question to my contest and suddenly have "gold, silver, bronze, super" or something. When I update the pivot chart data, will the new "super" column wipe out the total points column? 3. Can I sort the list by that "total points" column so that it's ranked based on who has the most total points without having to do a "sort" every single day? Is there a built in way to do that with pivot tables? SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" Last edited by sterlingice : 06-16-2005 at 12:59 PM. |
|||||||||||||||||||||||||||||||||||||||||||||
06-16-2005, 01:03 PM | #19 |
Dearly Missed
(9/25/77-12/23/08) Join Date: Nov 2003
Location: DC Suburbs
|
Try here
__________________
NAFL New Orleans Saints GM/Co-Commish MP Career Record: 114-85 NAFL Super Bowl XI Champs In memory of Gavin Anthony: 7/22/08-7/26/08 |
06-16-2005, 01:06 PM | #20 |
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
I've got excel in French here, so the terms may not be right...
1) right click on the column header, there should be a "order" in there, you can move the columns to where you want them 2) the pivot table will expand. Only problem is if you add some calculated formula to the right of your grand total column, that will be wiped out. Now I'm thinking, is your grand total automatically calculated by the pivot table or not? if not, there's a way to have the table do that. If it is, then it is part of the table and will expand if more columns are needed. 3) double click on the cell that reads "Answer" (should be grey) and click "advanced" you can set sorting in there... FM
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
06-16-2005, 01:11 PM | #21 | ||
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
Quote:
Good deal. That was easy Quote:
Is there a way to set up my Grand Total to not just be a count of the number of answers, but ((Count of Gold *5) + (Count of Silver * 3) + (Count of Bronze * 1))? Then 2 and 3 are solved at the same time because then I just sort on Grand Total. SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" |
||
06-16-2005, 01:26 PM | #22 |
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
I'm trying to find a way to do it inside the pivot table but I can't seem to find one. Best way would be to hide the current grand total and create the addition in an outside column, with the good weight for every type of answer. Dont worry, if you ever come to introduce a new level, it will ask you if you want to replace the outside grand total with a new column from the pivot table before it does so. You can then say no, move the grand total column one to the right and add the level to your pivot table afterward...
FM
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
06-16-2005, 06:49 PM | #23 | |
High School JV
Join Date: May 2001
|
Quote:
You should be able to do this using a calculated field. Make sure the pivot bar toolbar is showing. Click on "Pivot Table", then Formulas, then Calculated Field. You can create the formula in there and it should show up in your table. Hope this is what you were looking for -- I just skimmed your post. |
|
06-16-2005, 10:39 PM | #24 | ||
lolzcat
Join Date: May 2001
Location: williamsburg, va
|
Quote:
Keep in mind if you add a calculated field, your grand total become essentially worthless... It will add Gold + Silver + Bronze + Calculated Field.. Any time I added a calculated field, I automatically hide the Grand Total colum..
__________________
Text Sports Network - Bringing you statistical information for several FOF MP leagues in one convenient site Quote:
|
||
06-16-2005, 11:16 PM | #25 |
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
I've been fighting with how to do the calculated field. I just can't figure out how to make the total. Every time I do something, it adds a second row to each set of data and not a column at the end of the table like I want. I guess it's just that I can't figure out how to select the data I want to use.
SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" Last edited by sterlingice : 06-16-2005 at 11:22 PM. |
06-16-2005, 11:24 PM | #26 | ||
lolzcat
Join Date: May 2001
Location: williamsburg, va
|
Quote:
Send the spreadsheet to wademoore AT gmail.com
__________________
Text Sports Network - Bringing you statistical information for several FOF MP leagues in one convenient site Quote:
|
||
06-17-2005, 03:33 AM | #27 |
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
Frankly, I have no idea how I did it but thanks to wade's instructions via gmail and some tinkering on my own, I have an auto updating, auto counting, and auto sorting (based on total points) pivot table. Also, I have no idea how it knew to sort via the score field but I'm not complaining as it works after about 30 minutes of messing with it.
SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" |
06-17-2005, 05:33 AM | #28 | |
lolzcat
Join Date: May 2001
Location: williamsburg, va
|
glad i could help
__________________
Text Sports Network - Bringing you statistical information for several FOF MP leagues in one convenient site Quote:
|
|
06-17-2005, 08:38 AM | #29 |
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
one last time...
PIVOT TABLE!!!! FM
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
06-17-2005, 08:41 AM | #30 |
Dearly Missed
(9/25/77-12/23/08) Join Date: Nov 2003
Location: DC Suburbs
|
Maybe you should try that pivot thing, whatever it is called, does anyone know?
__________________
NAFL New Orleans Saints GM/Co-Commish MP Career Record: 114-85 NAFL Super Bowl XI Champs In memory of Gavin Anthony: 7/22/08-7/26/08 |
06-17-2005, 01:10 PM | #31 |
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
So, does anyone know how I magically got it to sort? At that point, I was trying anything I could come up with and wasn't paying all that much attention.
SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" |
06-17-2005, 01:13 PM | #32 | |
Hattrick Moderator
Join Date: Jan 2003
Location: Pintendre, Qc, Canada
|
Quote:
With the pivot table menu bar active, click the title above the list of players. Then click the pivot table drop down on the menu bar and find something something that looks like "sort and top 10" (I got it in French here, it says "Tri et Top 10")... you should find your sorting in there... FM
__________________
A Black Belt is a White Belt who refused to give up... follow my story: The real life story of a running frog... |
|
07-01-2005, 02:37 PM | #33 | |
Hall Of Famer
Join Date: Apr 2002
Location: Back in Houston!
|
Quote:
Now it's starting to do screwy things as to how it sorts. It will sort by the games list rather than by the total points and I can't find how to sort by that. If I select "sort"- it only allows me pick "count of game" and "answer". It won't let me select the columns by which it sorts. SI
__________________
Houston Hippopotami, III.3: 20th Anniversary Thread - All former HT players are encouraged to check it out! Janos: "Only America could produce an imbecile of your caliber!" Freakazoid: "That's because we make lots of things better than other people!" |
|
07-01-2005, 03:17 PM | #34 |
High School JV
Join Date: May 2001
|
Highlight the data in the pivot table, not including the header rows. Then go to data, then sort. If you want to sort by total points, and that starts in cell G5, for example, put that in the Sort By spot.
This is even easier if you have your toolbar set up to have the sort arrow on there. Then you choose the total points column header and click the arrow. Last edited by lurker : 07-01-2005 at 03:22 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|