+ Reply to Thread
Results 1 to 6 of 6

How many unique products in a price band

  1. #1
    Forum Contributor
    Join Date
    02-17-2005
    Location
    Wokingham
    MS-Off Ver
    365
    Posts
    101

    How many unique products in a price band

    Hi

    I need to identify how many unique coloured products are in one of two price bands.

    Totalling in separate columns

    Enclosed is an example of the problem.

    Any ideas would be gratefully received.

    Thanks Steven811

    Sum if in range.xlsx

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: How many unique products in a price band

    Hi Steven811

    Try the following, the price criteria is hard coded, so you might to consider putting them into cells and referencing them.
    In G3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In H3 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    They are both array formulas,so to commit them. CTRL + SHIFT + ENTER
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How many unique products in a price band

    hi Steven 811, another alternative array formula. in G3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ...confirmed by pressing CTRL-SHIFT-ENTER to activate the array. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL-SHIFT-ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again. change the one in red for H3 to be 4 & 6

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Forum Contributor
    Join Date
    02-17-2005
    Location
    Wokingham
    MS-Off Ver
    365
    Posts
    101

    Re: How many unique products in a price band

    Hi

    Thanks for the replies and suggestions.

    When I use the formulas I was expecting to see the number 4 for example in G3. This being the sum of unique colours in the price band £1-£3, however the result "yellow" is being returned in G3.

    Steven811

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How many unique products in a price band

    try this array then:
    =SUM(SIGN(FREQUENCY(IF($E$2:$E$17>=1,IF($E$2:$E$17<=3,MATCH($D$2:$D$17,$D$2:$D$17,0))),ROW($D$2:$D$17)-ROW($D$2)+1)))

  6. #6
    Forum Contributor
    Join Date
    02-17-2005
    Location
    Wokingham
    MS-Off Ver
    365
    Posts
    101

    Re: How many unique products in a price band

    That seams to have got it.

    Thanks to everyone for help.

    As always I'm indebted to the forum members
    Last edited by Steven811; 03-09-2013 at 11:00 AM. Reason: typo

+ 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