I have a chart of about 40,000 lines that I need to analyze. It's the results of a large survey (topic changed for privacy). Multiple users applied tags to a piece of content. For instance, if I gave you www.cnn.com and asked you to mark it as a website for: News, Media, or Entertainment, you would mark one. Multiple users did that. What I have to do for the 5,000 items that were surveyed is to figure out which answer users answered most. So in the pasted example below, for CNN there were 4 responses, and 2 people marked News. So News is the answer I want. Pivot tables give a nice layout of what those are, but I can't go through 5,000 items (like CNN.com) to manually look up the max for each. What function can I use to automate this? Any help appreciated- Thanks!
Row Labels Count of Final Answer
www.cnn.com 4
news 2
media 1
entertainment 1
Last edited by sez3; 07-20-2010 at 03:26 PM.
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.
If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
Doing this will ensure you get the result you need!
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Thanks for the suggestion. I've created a spreadsheet as an example of what the data looks like (on a smaller level obviously). Thanks for the help!
Ok, see if this helps...
First, I changed the PT layout to Tabular form so that I have separate columns for each category.
Then I applied a formula in G8 to basically put the Item name in each cell...
copied down.=IF(RIGHT(D8,5)="Total","",LOOKUP(REPT("z",255),$D$7:D8))
Then formula in H8 to get you the most occurring Answer:
which must be confirmed with CTRL+SHIFT+ENTER and copied down.=IF(G8="","",IF(E8=INDEX($E$8:$E$23,MATCH(1,($G$8:$G$23=G8)*($F$8:$F$23=MAX(IF($G$8:$G$23=G8,$F$8:$F$23))),0)),E8,""))
You can adjust ranges to suit your actual pivot table.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Thank you! I think it is making sense but am still working through the equation and translating into my sheet. Thank you for the immediate help and I will reply back more in full in a bit when I've worked through this enough to understand.
Right-click the answer field, choose Filter-Top 10 and set it to Top 1 by Count of Respondent. See attached.
An alternative formula to get the results to show up in line with first occurance of item would be:
Confirmed with CTRL+SHIFT+ENTER not just ENTER...=IF(OR(G8="",G7=G8),"",INDEX($E$8:$E$23,MATCH(1,($G$8:$G$23=G8)*($F$8:$F$23=MAX(IF($G$8:$G$23=G8,$F$8:$F$23))),0)))
Note: You still need helper column.
P.S. Romperstomper's suggestion is a great alternative to not having to use formulas... but it lists either all your values or only your top values.... not both. But you can do 2 separate Pivots....
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
That is awesome!! Exactly what I was looking for Romperstomper!
@NVBC, thank you very much for spending time. I think your equation works, I'm just not sophisticated enough in Excel to fully get it. I very much appreciate you spending time on it.
@Romperstomper- thanks a ton- that's great! Exactly what i was trying to do. Appreciate the help.
Sorry for having overcomplicated it... sometimes your mind bends the wrong way
Please remember to mark the thread as Solved.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Luckily I'm too simple to overcomplicate things generally!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks