+ Reply to Thread
Results 1 to 7 of 7

Text Counts

  1. #1
    Registered User
    Join Date
    03-28-2007
    Posts
    2

    Text Counts

    I have a column named "Selection", in which it is pertaining to an upcoming event in which the participants can select either a "Beef", "Chicken", or "Vegetarian" entree. And for the people not attending it's simply marked "N/A". I'm trying to get a count of each using a formula, but can't seem to get any one right. I want:

    Beef: Count of how many "Beef"
    Chicken: Count of how many "Chicken"
    Veg: Count of how many "Vegetarian"

    Any guidance would be greatly appreciated. Thanks.

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    If your selections are in Column B, cells B2:B100, use these formulas


    =COUNTIF(B2:B100,"BEEF")
    =COUNTIF(B2:B100,"CHICKEN")
    =COUNTIF(B2:B100,"VEGETARIAN")

    Hope this helps.

    EDIT TO ADD: You should consider setting up a data validation on that column, because these formulas will only count information if it is entered exactly. So, if you misspell chicken, for example, in one cell, it will not count it.

  3. #3
    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
    Try

    =COUNTIF(A:A,"beef")

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    03-28-2007
    Posts
    2
    First one worked. Tried it before but was putting a space after the comma. Thanks

  5. #5
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Glad it worked for you

  6. #6
    Registered User
    Join Date
    04-10-2007
    Posts
    1

    Counting totals from different row

    Hi

    Along the same line......

    Column D contains expense totals in dollars. Column E contains the category of the expense (example: food, auto, entertainment,etc.).

    What formula would total all items in Column D categorized as "food" in Column E?

    Thanks in advance!

  7. #7
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    =SUMIF(D1:D100,"food",E1:E100)

    Assuming you have populated rows 1-100.

+ 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