+ Reply to Thread
Results 1 to 3 of 3

User-Defined Function to Determine Content of Cells in a Range

  1. #1
    RBohannon
    Guest

    User-Defined Function to Determine Content of Cells in a Range

    I'm familiar with VBA, but I have never written VBA in Excel.

    I have a worksheet that contains personal data on employees. Some
    fields have codes that I need to find the sum of, for example for the
    field ECode (column C) I need to count how many are "0", "1", "2", etc.

    How would I write a function to count how many of a particular code
    there are in a given range, say C6:C520?

    Thanks.


  2. #2
    RBohannon
    Guest

    Re: User-Defined Function to Determine Content of Cells in a Range

    I just found the COUNTIF function. It does exactly what I need. I was
    sure there must be a built-in function, I just wasn't sure what to look
    for.


  3. #3
    JE McGimpsey
    Guest

    Re: User-Defined Function to Determine Content of Cells in a Range

    Do you need a UDF?

    Try

    =COUNTIF(C6:C520,0)



    In article <[email protected]>,
    "RBohannon" <[email protected]> wrote:

    > I'm familiar with VBA, but I have never written VBA in Excel.
    >
    > I have a worksheet that contains personal data on employees. Some
    > fields have codes that I need to find the sum of, for example for the
    > field ECode (column C) I need to count how many are "0", "1", "2", etc.
    >
    > How would I write a function to count how many of a particular code
    > there are in a given range, say C6:C520?


+ 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