+ Reply to Thread
Results 1 to 11 of 11

count unique text by month

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    Telford, England
    MS-Off Ver
    ms365
    Posts
    34

    count unique text by month

    Hi Folks,

    I am looking to find how many times a text item occurs per month.

    I have attached a spreadsheet to highlight what I have tried so far:
    =SUM(--(FREQUENCY(IF($D2:$D50=F$1,MATCH($A2:$A50,$A2:$A50,0)),ROW($A2:$A50)-ROW($A2)+1>0)))

    any advice would be much appreciated.

    Mike
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: count unique text by month

    Col D is text but F1 is a date, so try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-10-2014
    Location
    Telford, England
    MS-Off Ver
    ms365
    Posts
    34

    Re: count unique text by month

    Thanks for the reply, this certainly produces data, which is a great step forward, but it counts all occurrences not unique entries, so I have made a mistake somewhere else in the formula.

  4. #4
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,296

    Re: count unique text by month

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: count unique text by month

    Hadn't noticed one of the brackets was in the wrong place. Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-10-2014
    Location
    Telford, England
    MS-Off Ver
    ms365
    Posts
    34

    Re: count unique text by month

    I have never used the power query, so thank you for highlighting this as an option.

  7. #7
    Registered User
    Join Date
    04-10-2014
    Location
    Telford, England
    MS-Off Ver
    ms365
    Posts
    34

    Re: count unique text by month

    Hi Folks,

    I have realised that the formula works perfectly, but it is not what I need, which is my mistake.

    I thought the frequency would pull the unique values only once and the sum would then add up the unique entries.

    it is actually summing all occurrences of the text in column A by month.

    I need to know the number of times per month each unique value appears (not a sum of occurrences)

    so I need a new formula that will achieve this.

    is it also possible to have 2nd criteria?
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: count unique text by month

    Try the 2nd formula that I posted.

  9. #9
    Registered User
    Join Date
    04-10-2014
    Location
    Telford, England
    MS-Off Ver
    ms365
    Posts
    34

    Re: count unique text by month

    perfect, thank you.

    don't know how I missed the second formula.

    is it possible to add a second query?

    its not essential, but it would be nice to know if the trailers were single or double deck, as double deck use more fuel for each mile travelled due to the greater wind resistance.

    I have a formula to pull out all the double deck trailers which I can add to column E, so the additional query in column F would have to look for "Yes" or "No", in column E.

    Mike

  10. #10
    Registered User
    Join Date
    04-10-2014
    Location
    Telford, England
    MS-Off Ver
    ms365
    Posts
    34

    Re: count unique text by month

    Oh,

    I cracked it, its simply another IF statement before the Match function.

    Thank yo for the help.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: count unique text by month

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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. [SOLVED] count unique values per month
    By tosteven in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-26-2022, 11:28 AM
  2. Formula to Count Unique Customer by Month
    By hokttor in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-16-2021, 06:23 PM
  3. [SOLVED] Count of unique contractors that were paid during the month
    By DD1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-19-2015, 10:11 PM
  4. Count number of unique cells if month =
    By BM02GAN in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2014, 12:31 PM
  5. Count Unique text against another unique text prior to todays date
    By VBSK8R in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-22-2011, 11:24 AM
  6. Count unique for specific month
    By Bob@Sun in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2011, 02:52 PM
  7. Count unique days within month
    By jirib in forum Excel General
    Replies: 7
    Last Post: 08-26-2010, 06:12 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