+ Reply to Thread
Results 1 to 6 of 6

Populate tables by category

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    3

    Populate tables by category

    Hi all

    I have a long list of TV programmes on different channels and I would like to create 3 rankings of programmes by channel (ideally already ranked in order of audience size but could do that manually with a filter).

    At the moment I can't even figure out a formula to populate the different channel tables so any help would be much appreciated!

    I have attached an example of the data with prog names being in column A, channel in B and audience levels in C. These would I then like to have in 3 different tables in a different tab - one for each channel. Does that make sense at all?

    Thanks in advance for your help!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Populate tables by category

    MK0708,

    See attached which ranks your TV programmes by channel and viewers. I use two array formulas, the first finds the programmes that are on specific channel ($A$1), if that condition is true is pulls the audience figures for that programme. I then use the LARGE function to give the biggest first etc

    {=IFERROR(LARGE(IF($A$1=data!$B:$B,data!$C:$C),ROW(tables!B1)),"")}

    The programme name is then pulled by matching the channel with the viewing figure (A$1&B3) to the relevant columns in the data table to give the row and then using the index function to pull the value of the row

    {=IFERROR(INDEX(data!$A:$A,MATCH(A$1&B3,data!$B:$B&data!$C:$C,0)),"")}

    I have used the references for all the columns ($A:$A, $B:$B, $C:$C) which has the advantage that you can fill in as many programmes as you want on the data table but it may make it slower than if you restricted the ranges to 100. You can play about to see what works for you.

    Regards

    David
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Populate tables by category

    Excellent, thank you! I get the Programme names in my template but not the viewing figures - could it be because I have missing values (#DIV/0!) in some cells? This is happening because it's the same programme list every month but not every programme airs every month so in some months there'll be a missing value for some of the programmes in the list...

    Thanks for your help!

  4. #4
    Registered User
    Join Date
    06-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Populate tables by category

    mk0708,

    I would need to see the spreadsheet you are looking at to diagnose your problem, any chance you can attach (remove any confidential data first)!

    Regards

    David

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Populate tables by category

    Hi David

    I have attached the revised template. I basically need to populate the tables from a tab called Programme list which averages the data from the data tab. For some reason this doesn't seem to work though and I'm not quite sure where things have gone wrong.

    Thanks so much for your help, it's much appreciated!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Populate tables by category

    mk0708,

    On the Channel A table you were correct in that the DIV/0 error was creating the problem. I have added an additional IFERROR to replace the DIV/0 with a FALSE and now it works. See attached

    A tip to debug - I changed the ranges to B1:B20 etc and then if you highlight each section of the formula and press F9 it evaluates, <ctrl-z> to go back. In this way I could see what was going wrong,

    On Channel B you had another problem, the LARGE (xxx,n) function returns the nth largest from a list of values. I used the Row(b1) to generate a 1, when you copy this down you get Row(b2) in the next to give a 2, Row(B3) in the next to get a 3. So when you start the ranked list for Channel B you need to reset this to B1 for the first so it pulls the largest, you cannot just copy this down from the previous table.

    Another thought - it might be easier to do in a pivot table, no complicated formulas to think about. I have put one in the attached.

    Regards

    David
    Attached Files Attached Files

+ 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. VBA: table into several tables based on a category
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2014, 10:11 PM
  2. [SOLVED] Productsum: Highest Frequency Category, Specific Main Category, Frequency of Category
    By T86157 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-24-2012, 12:43 PM
  3. Category summary for 12 pivot tables
    By MeScott in forum Excel General
    Replies: 3
    Last Post: 07-24-2010, 03:08 AM
  4. Use Table to Auto Populate Other Tables
    By ffmariners in forum Excel General
    Replies: 3
    Last Post: 05-05-2010, 02:12 PM
  5. Problems with updating category names in pivot tables
    By Vladimir in forum Excel General
    Replies: 2
    Last Post: 11-03-2005, 09:00 AM

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