+ Reply to Thread
Results 1 to 9 of 9

Average

  1. #1
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Average

    Hi all,

    I need to find an average - The question I have to answer is "What is the avg number of unique outlets visited by customers in a year"

    Normally this would be a simple task, however, the quantity of data is making this a toughy and i'm struggling!

    In Col A I have 600,000 Customer ID's
    In Col C I have the names of the Outlets they visited
    In Col G I have a list of 192,000 Unique Customer ID's (uniqued from Col A)

    I need to find the number of unique sites visited by Custome ID then divide this by the number of customers.

    Given this quantity of data - any suggestions for achieving this.

    Attached is a v small sample of anonymised data

    Thanks
    Attached Files Attached Files
    Last edited by Blake 7; 06-15-2011 at 10:20 AM.
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Average

    In the sample you give, what are some expected results... as far as I can see there are no duplicate outlets for specific customer.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Average

    Hiya

    Cell D2 000002658X, this cust id appears 6 times in Col A - what I need is how many unique outlets he visited, Col B - in this case 6.

    Does that help?

    What i need to arrive at is the number of Unique outlets visited by cust id and then divide this by the number of cust ids to get the avg number of outlets visited!
    Last edited by Blake 7; 06-15-2011 at 10:35 AM.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Average

    I'm assuming that by "unique" you mean different, e.g. for each customer get a total of the different outlets visited.

    Try a helper column, e.g. in C2 copied down

    =IF(COUNTIFS(A$2:A2,A2,B$2:B2,B2)=1,1,"")

    Then in E2 copied down

    =SUMIF(A:A,D2,C:C)

    Now average column E....
    Audere est facere

  5. #5
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Average

    Hey DLL - thanks for that. I'll give it a shot but what im finding is that with this many cols excel blows up!!

    I'll give it a shot now and report back.

    Thanks for your help.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Average

    Yes, I'm hoping that those formulas are simple enough to use over thousands of rows - I didn't test that........

  7. #7
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Average

    i'll report back! its calcing now!

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Average

    If that isn't fast enough then possibly use 2 helper columns - concatenate A and B in column G by using this formula in G2 copied down

    =A2&"-"&B2

    then in C2 copied down

    =IF(ISNUMBER(MATCH(G2,G$1:G1,0)),"",1)

  9. #9
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Average

    Quote Originally Posted by daddylonglegs View Post
    I'm assuming that by "unique" you mean different, e.g. for each customer get a total of the different outlets visited.

    Try a helper column, e.g. in C2 copied down

    =IF(COUNTIFS(A$2:A2,A2,B$2:B2,B2)=1,1,"")

    Then in E2 copied down

    =SUMIF(A:A,D2,C:C)

    Now average column E....
    Hiya - some fb. I tried this way and waited 35 mins !!! then had to Ctrl alt del to stop process! will try your other method now!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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