+ Reply to Thread
Results 1 to 5 of 5

How many times is a name listed

  1. #1
    Registered User
    Join Date
    04-29-2006
    Posts
    12

    How many times is a name listed

    Thanks for any help (but make it simple please)

    I need to know how many times a item is listed.

    A1 Bread
    A2 Bread
    A3 Bread
    A4 Milk
    A5 Sugar
    A6 Sugar

    How many times are bread, milk, and sugar listed? This will be for finding out how many times inventory items were purchased.

  2. #2
    Nick Hodge
    Guest

    Re: How many times is a name listed

    You will do best to set up a list of the products and count the number
    alongside there, but using your example in B1 enter

    =COUNTIF($A$1:$A$6,A1)

    and copy this formula down to B6. Obviously you will get the same result of
    3 alongside each entry of bread for example, which is why I would set up a
    separate table with unique items, but the theory is the same.

    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    www.nickhodge.co.uk
    [email protected]HIS


    "sabegirl" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for any help (but make it simple please)
    >
    > I need to know how many times a item is listed.
    >
    > A1 Bread
    > A2 Bread
    > A3 Bread
    > A4 Milk
    > A5 Sugar
    > A6 Sugar
    >
    > How many times are bread, milk, and sugar listed? This will be for
    > finding out how many times inventory items were purchased.
    >
    >
    > --
    > sabegirl
    > ------------------------------------------------------------------------
    > sabegirl's Profile:
    > http://www.excelforum.com/member.php...o&userid=33982
    > View this thread: http://www.excelforum.com/showthread...hreadid=553000
    >




  3. #3
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    =COUNTIF(A1:A6,"bread") etc


    Edit: Doh! beaten at the post

  4. #4
    Bluesky
    Guest

    RE: How many times is a name listed

    =COUNTIF(A:A,"Bread ")
    =COUNTIF(A:A,"Milk ")
    =COUNTIF(A:A,"Sugar ")

    Hope it may help.

    Best Regards
    Bluesky

    "sabegirl" wrote:

    >
    > Thanks for any help (but make it simple please)
    >
    > I need to know how many times a item is listed.
    >
    > A1 Bread
    > A2 Bread
    > A3 Bread
    > A4 Milk
    > A5 Sugar
    > A6 Sugar
    >
    > How many times are bread, milk, and sugar listed? This will be for
    > finding out how many times inventory items were purchased.
    >
    >
    > --
    > sabegirl
    > ------------------------------------------------------------------------
    > sabegirl's Profile: http://www.excelforum.com/member.php...o&userid=33982
    > View this thread: http://www.excelforum.com/showthread...hreadid=553000
    >
    >


  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi Sabegirl,


    Try using Countif.

    If you make a table like below you can refer to the cell reference
    =COUNTIF($A$1:$A$6,C1)

    C1 "Bread" D1 =COUNTIF($A$1:$A$6,C1)
    C2 "Milk" D2 =COUNTIF($A$1:$A$6,C2)
    C3 "Milk" D3=COUNTIF($A$1:$A$6,C3)

    Note use F4 to add the $ so when you drag the formula down the range stays absolute

    otherwise just type in the word in a cell and replace the cell ref with "Bread"

    =COUNTIF($A$1:$A$6,"Bread")

    Hope this helps

    VBA Noob

+ 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