+ Reply to Thread
Results 1 to 9 of 9

Counting formula

  1. #1
    Registered User
    Join Date
    03-22-2011
    Location
    Colombo, Sri Lanka
    MS-Off Ver
    Excel 2007
    Posts
    16

    Post Counting formula

    Hi Everyone,

    Pls I need your help to looking for the formula

    pls see the attached file, there are some outlets of different area such as North & South
    and there ara some outlets with Outlet code. The outlet code is unique, but there are duplicates for different brands (Apple, Orange, Banana...etc)
    So I want write a formula to looking for as Example area wise how many outlets have sold Banana or Apple ?
    I have put the answers near the answering block.

    Pls help me

    Thanks

    Book1.xlsx

    Neranjan

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: Counting formula

    if you want "apple or banana" this will work for you... countifs($C$4:$C$23,E28,$F$4:$F$23,"apple") and change "apple" to "banana" if you want that. If you want both then countifs($C$4:$C$23,E28,$F$4:$F$23,"apple")+countifs($C$4:$C$23,E28,$F$4:$F$23,"banana")
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    03-22-2011
    Location
    Colombo, Sri Lanka
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Counting formula

    Hi Sambo kid, Thanks your reply, But I want to without duplicates (Outlet codes)
    If have one outlet as one for "banana" and one for "Apple", I want that outlet count as 1 record.
    Have you any formula for it ??

    Thanks

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: Counting formula

    ok, if I understand it correctly, are you opposed to adding a helper column? If you are ok with that, I'd put this formula in H4 and copy down...=COUNTIF($D$4:D4,D4) That will return a 1 for outlets that only appear once and a 2 (or higher) for any that appear more than once.
    then use this for the count... =COUNTIFS($C$4:$C$23,E28,$F$4:$F$23,"apple",$H$4:$H$23,1)

  5. #5
    Registered User
    Join Date
    03-22-2011
    Location
    Colombo, Sri Lanka
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Counting formula

    Hi Sambo kid, Thanks for your reply, but the answer that I want has not captured. I want "How many outlets have sold Banana & Apple in South area ?" 3 outlets have sold more than 1 fruit

    Thanks

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: Counting formula

    ok, then use the helper column and use this countif formula... =COUNTIFS($C$4:$C$23,E29,$F$4:$F$23,"apple",$H$4:$H$23,1)+COUNTIFS($C$4:$C$23,E29,$F$4:$F$23,"banana",$H$4:$H$23,1)

  7. #7
    Registered User
    Join Date
    03-22-2011
    Location
    Colombo, Sri Lanka
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Counting formula

    Oh, Sambo Kid Thank you very much. Now its working
    But Its grate if you can you try write this formula without helper colum ?
    Now I am going to off (From the office). I will login on tomorrow morning.
    Thanks you again

  8. #8
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Counting formula

    F28
    Please Login or Register  to view this content.
    Try below array formula (Confirm with Shift+Ctrl+Enter)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  9. #9
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Counting formula

    or
    Please Login or Register  to view this content.
    Try below array formula (Confirm with Shift+Ctrl+Enter)

+ 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. New formula, counting
    By Struja in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2013, 11:55 AM
  2. Need a counting formula
    By Ferloft in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-01-2013, 07:59 AM
  3. [SOLVED] Need Help with Counting Formula
    By benwahchang in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-18-2013, 08:45 AM
  4. Counting formula
    By Lithiar in forum Excel General
    Replies: 5
    Last Post: 11-21-2012, 11:59 AM
  5. Replies: 6
    Last Post: 02-04-2012, 06:57 PM
  6. Excel 2007 : Counting formula
    By njnoorani in forum Excel General
    Replies: 2
    Last Post: 12-21-2011, 02:49 PM
  7. Counting Formula
    By freshstart in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-08-2008, 12:07 PM

Tags for this Thread

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