+ Reply to Thread
Results 1 to 3 of 3

How to count the amount of a certain number in a cell range

  1. #1
    Registered User
    Join Date
    01-10-2005
    Posts
    11

    Question How to count the amount of a certain number in a cell range

    I am creating a semimonthly work calendar for myself. I need the days across the top and times along the side. 7am to 7pm broken into half hour increments.

    I have five different worksheets (WS) in a workbook:
    WS1 = First Half Master
    WS2 = Second Half Master
    WS3 = Key
    WS4 = First Half Print
    WS5 =Second Half Print

    WS1, WS2, WS4, WS5 all have the exact same initial layout (Days across the top and hours along the side).
    WS3 is a key that describes each number that I will enter on WS1 and WS2. for example:
    1 CDR
    2 Refunds
    3 Meetings

    What I plan to do is enter the number (1,2,3, ect...) that corresponds to the activity I am doing on WS1 and WS2 and use the IF statement to show the results on WS4 and WS5.

    When I am finished WS1 and WS2 will have just numbers on them and WS4 and WS5 will have the activity.

    WS1
    Monday
    7:00 1
    7:30 2
    8:00 3

    WS4
    Monday
    7:00 CDR
    7:30 Refunds
    8:00 Meetings

    Ok now that you understand what I am doing lets get to the problem
    I would like to know how much time I am spending on each activity. Since I broke down the times by half hour increments what I would like to do is just count the number of lets say 2s in a certain cell range that I put on my WS1 or WS2 sheets. I will than take that sum and multiply it by 30 (minutes) than divide that by 60 (1 hour) and I have my total hours that I worked on that project.
    I dont know how to count just the 2s in a certain cell range
    Monday
    7:00 1
    7:30 2
    8:00 3
    8:30 2
    8:30 2
    9:00 1

    1 = 2 2*30/60 = 1 Total hours spent on project 1
    2 = 3 3*30/60 = 1.5 Total hours spent on project 2
    3 = 1 1*30/60 = .5 Total hours spent on project 3

    How do you just count the amount of certain numbers in a cell range?
    If you have any ideas on how to make this easier please let me know.
    Thanks!
    -Robert Sadler-
    Last edited by Robert Sadler; 01-10-2005 at 04:22 PM. Reason: Changing the title

  2. #2
    pinmaster
    Guest
    Hi
    Try:
    =countif(your_range,2)

    JG

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    =COUNTIF(A1:A30,1)

    This will count the number of cells in the range A1:A30 that contain the value 1.

+ 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