+ Reply to Thread
Results 1 to 2 of 2

Formula that applys to a range of data

  1. #1
    Registered User
    Join Date
    02-27-2006
    Location
    Oxford England
    MS-Off Ver
    2007
    Posts
    54

    Formula that applys to a range of data

    I have a list of orders, grouped by customer.

    I'm trying to count the unique number of orders per customer. Which the following formula works fine: =SUMPRODUCT((range<>"")/COUNTIF(range,range&""))

    I've subtotalled my list, but that just tells me customer x has 7 orders, my SUMPRODUCT formula tell me he has 3 unique orders in the list of 7. That's fine, but I don't want to type my SUMPRODUCT formula in for each customer and have to alter the number of rows it applies to. That would take all day.

    Some customers have one order, others a few and some many.

    Can I get the range bit to figure out the number of rows it needs to apply to, or start/stop where there is a blank row. Having subtotalled it there are blank rows.

    Example:
    Order1 Customer abc
    Order1 Customer abc
    Order2 Customer abc
    Subtotal 3
    Order4 Customer xyz
    Order5 Customer xyz
    Subtotal 2


    So Customer abc has three orders, two of them unique. Customer xyz has two orders, two of them unique. Id like the SUMPRODUCT formula on the same row as the SUBTOTAL ones and not have to edit it to cope with the varying number of rows.

    Thanks.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Formula that applys to a range of data

    You have a customer I'd so I would suggest that you use that in your SUMPRODUCT and use COUNTIFS rather than COUNTIF so you can use their there too.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Replies: 4
    Last Post: 02-10-2015, 04:51 AM
  2. Replies: 2
    Last Post: 09-01-2014, 07:59 AM
  3. [SOLVED] chart based on dynamic range which resizes as per data in range-formula / vba
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2014, 04:02 PM
  4. [SOLVED] Formula to count frequency of data in cell range based on data in different cell range
    By jrosko1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2013, 09:47 AM
  5. data range formula
    By fentiger79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2012, 10:22 AM
  6. IF Formula with data range
    By SAsplin in forum Excel General
    Replies: 3
    Last Post: 12-07-2009, 10:58 AM
  7. [SOLVED] A formula in Data Range
    By bartsie in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-27-2006, 12:10 PM

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