+ Reply to Thread
Results 1 to 6 of 6

Thread: Counting Multiple of Similar Items as 1

  1. #1
    Registered User
    Join Date
    04-26-2008
    Posts
    5

    Counting Multiple of Similar Items as 1

    Hi,

    Here's my problem.
    I have a list of fruits and vegetables.
    I want to have formula that would go through the list and for every fruit (i.e apples, oranges, bananas etc.) it sees, it counts as 1 fruit.

    Example:

    Apple
    Orange
    Orange
    Lettuce
    Banana
    Apple
    Apple
    Broccoli

    Fruit = 6

    I think it will involve using arrays, but I don't have any true experience using those. So please be detailed in your explanations.

    Thanks,

  2. #2
    Valued Forum Contributor acsishere's Avatar
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2007
    Posts
    303

    Smile Dear Aviavy,

    Do you look for VLOOKUP Function.

    If so, I attached a file. In that example, you can increase the number of fruits/vegs as you like (only you need to name those cells). Please let me know if you find any difficulty.

    A small modification I made. Please see now.

    acsishere.
    Attached Files Attached Files
    Last edited by acsishere; 04-26-2008 at 02:40 PM.

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,057
    If fruit & veg is in A1:A10 this formula will give a unique count

    =SUMPRODUCT((A1:A10<>"")/COUNTIF(A1:A10,A1:A10&""))

  4. #4
    Registered User
    Join Date
    04-26-2008
    Posts
    5

    @acsishere

    So basically you're applying a single code to all fruits and then counting the amount times the code appears.
    Can you explain on your VLOOKUP formula, I've only started using those 2 days ago.

  5. #5
    Valued Forum Contributor acsishere's Avatar
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2007
    Posts
    303

    Smile Dear Aviavy

    Have you got it.

    Once again I am attaching a file with few more explanations. Please look at this.

    Please let me know queries, if any.

    acsishere.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-26-2008
    Posts
    5

    @acsishere

    I totally understand it now. Thanks a bunch!

+ 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.2.0