+ Reply to Thread
Results 1 to 6 of 6

Counting Records in Excel?

  1. #1
    Arsenio Oloroso
    Guest

    Counting Records in Excel?

    Basically...
    I'm trying to figure out how to do something in Excel that could readily
    be done in MS Access.

    I have an Excel list, and I want to know how many records contain
    "Chicago" in one of the fields.

    I thought up this array formula:

    =SUM(IF(F2:F1123="chicago",1,0))

    The idea is that, for every cell containing "chicago," Excel would enter
    a "1" in a duplicate range and a "0" if the cell didn't contain
    "chicago." Excel then would add up the ones and tell me how many
    records in the list were from...Chicago.

    This doesn't appear to work after I do [control][enter]. I get a "0."
    What am I doing wrong? Is my syntax incorrect? Am I even on the right
    track?

    Any leads are much appreciated.


  2. #2
    Anne Troy
    Guest

    Re: Counting Records in Excel?

    You're making it too difficult. Just use this:

    =COUNTIF(F:F,"chicago")

    *******************
    ~Anne Troy

    www.OfficeArticles.com
    www.MyExpertsOnline.com


    "Arsenio Oloroso" <[email protected]> wrote in message
    news:[email protected]...
    > Basically...
    > I'm trying to figure out how to do something in Excel that could readily
    > be done in MS Access.
    >
    > I have an Excel list, and I want to know how many records contain
    > "Chicago" in one of the fields.
    >
    > I thought up this array formula:
    >
    > =SUM(IF(F2:F1123="chicago",1,0))
    >
    > The idea is that, for every cell containing "chicago," Excel would enter
    > a "1" in a duplicate range and a "0" if the cell didn't contain
    > "chicago." Excel then would add up the ones and tell me how many
    > records in the list were from...Chicago.
    >
    > This doesn't appear to work after I do [control][enter]. I get a "0."
    > What am I doing wrong? Is my syntax incorrect? Am I even on the right
    > track?
    >
    > Any leads are much appreciated.
    >




  3. #3
    Earl Kiosterud
    Guest

    Re: Counting Records in Excel?

    Arsenio,

    Anne's solution is the way to go. BUt I'd thought I'd mention this. You
    were pretty close. Your formula would not cycle through F2:F1123 unless you
    made it an array formula, simply by using Ctrl-Shift-Enter to commit it to
    the cell, instead of just enter.

    If you'll be needing a total for every entry in that column (Chicago,
    Springfield, Hoboken, Bumfolk, etc.), consider a pivot table. They're easy,
    and give you a total (sum, count, etc.) for every kind of entry found.

    --
    Earl Kiosterud
    www.smokeylake.com/
    -------------------------------------------

    "Arsenio Oloroso" <[email protected]> wrote in message
    news:[email protected]...
    > Basically...
    > I'm trying to figure out how to do something in Excel that could readily
    > be done in MS Access.
    >
    > I have an Excel list, and I want to know how many records contain
    > "Chicago" in one of the fields.
    >
    > I thought up this array formula:
    >
    > =SUM(IF(F2:F1123="chicago",1,0))
    >
    > The idea is that, for every cell containing "chicago," Excel would enter a
    > "1" in a duplicate range and a "0" if the cell didn't contain "chicago."
    > Excel then would add up the ones and tell me how many records in the list
    > were from...Chicago.
    >
    > This doesn't appear to work after I do [control][enter]. I get a "0."
    > What am I doing wrong? Is my syntax incorrect? Am I even on the right
    > track?
    >
    > Any leads are much appreciated.
    >




  4. #4
    CLR
    Guest

    Re: Counting Records in Excel?

    And.......if you want to "see" the "chicago" data as well, the AutoFilter
    feature works wonders to help identify type-o's etc., along with the
    SUBTOTAL function for counting ,averaging, suming, etc.

    Vaya con Dios,
    Chuck, CABGx3




    "Earl Kiosterud" <[email protected]> wrote in message
    news:[email protected]...
    > Arsenio,
    >
    > Anne's solution is the way to go. BUt I'd thought I'd mention this. You
    > were pretty close. Your formula would not cycle through F2:F1123 unless

    you
    > made it an array formula, simply by using Ctrl-Shift-Enter to commit it to
    > the cell, instead of just enter.
    >
    > If you'll be needing a total for every entry in that column (Chicago,
    > Springfield, Hoboken, Bumfolk, etc.), consider a pivot table. They're

    easy,
    > and give you a total (sum, count, etc.) for every kind of entry found.
    >
    > --
    > Earl Kiosterud
    > www.smokeylake.com/
    > -------------------------------------------
    >
    > "Arsenio Oloroso" <[email protected]> wrote in message
    > news:[email protected]...
    > > Basically...
    > > I'm trying to figure out how to do something in Excel that could readily
    > > be done in MS Access.
    > >
    > > I have an Excel list, and I want to know how many records contain
    > > "Chicago" in one of the fields.
    > >
    > > I thought up this array formula:
    > >
    > > =SUM(IF(F2:F1123="chicago",1,0))
    > >
    > > The idea is that, for every cell containing "chicago," Excel would enter

    a
    > > "1" in a duplicate range and a "0" if the cell didn't contain "chicago."
    > > Excel then would add up the ones and tell me how many records in the

    list
    > > were from...Chicago.
    > >
    > > This doesn't appear to work after I do [control][enter]. I get a "0."
    > > What am I doing wrong? Is my syntax incorrect? Am I even on the right
    > > track?
    > >
    > > Any leads are much appreciated.
    > >

    >
    >




  5. #5
    Arsenio Oloroso
    Guest

    Re: Counting Records in Excel?

    Elegant in its simplicity! Thank you, Anne.

    Anne Troy wrote:
    > You're making it too difficult. Just use this:
    >
    > =COUNTIF(F:F,"chicago")
    >
    > *******************
    > ~Anne Troy
    >
    > www.OfficeArticles.com
    > www.MyExpertsOnline.com
    >
    >
    > "Arsenio Oloroso" <[email protected]> wrote in message
    > news:[email protected]...
    >
    >>Basically...
    >>I'm trying to figure out how to do something in Excel that could readily
    >>be done in MS Access.
    >>
    >>I have an Excel list, and I want to know how many records contain
    >>"Chicago" in one of the fields.
    >>
    >>I thought up this array formula:
    >>
    >>=SUM(IF(F2:F1123="chicago",1,0))
    >>
    >>The idea is that, for every cell containing "chicago," Excel would enter
    >>a "1" in a duplicate range and a "0" if the cell didn't contain
    >>"chicago." Excel then would add up the ones and tell me how many
    >>records in the list were from...Chicago.
    >>
    >>This doesn't appear to work after I do [control][enter]. I get a "0."
    >>What am I doing wrong? Is my syntax incorrect? Am I even on the right
    >>track?
    >>
    >>Any leads are much appreciated.
    >>

    >
    >
    >


  6. #6
    Arsenio Oloroso
    Guest

    Re: Counting Records in Excel?

    Thanks Earl,
    I forgot to press the shift key along with control and enter.


    Earl Kiosterud wrote:

    > Arsenio,
    >
    > Anne's solution is the way to go. BUt I'd thought I'd mention this. You
    > were pretty close. Your formula would not cycle through F2:F1123 unless you
    > made it an array formula, simply by using Ctrl-Shift-Enter to commit it to
    > the cell, instead of just enter.
    >
    > If you'll be needing a total for every entry in that column (Chicago,
    > Springfield, Hoboken, Bumfolk, etc.), consider a pivot table. They're easy,
    > and give you a total (sum, count, etc.) for every kind of entry found.
    >


+ 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