+ Reply to Thread
Results 1 to 2 of 2

Counting numbers above a certain value from within a table.

  1. #1
    Registered User
    Join Date
    05-27-2022
    Location
    Leipzig,Germany
    MS-Off Ver
    Excel 365
    Posts
    8

    Counting numbers above a certain value from within a table.

    I have a hard time creating an excel table that I want to use in order to calculate the nightshift hours I spend doing my job
    .
    I want to create a formula that would automatically do this for me and I would just have to change the values.

    As a side note: They are only considered night-shift hours if there are past 22:00 (10PM) and there are 3 consecutive hours. It should look something like this:
    (I have attached a work-sheet)

    What Should the formula be?

    I tried multiple variants that involved =SUM, =AND, =COUNTIF

    I have also tried using the formula:
    =COUNTIF(A1:A10,">22:00")-COUNTIFS(A1:A10,">22:00",A2:A11,">22:00",A3:A12,">22:00")
    But this is definitely not accurate,

    Am I at least on the right path?
    Attached Files Attached Files
    Last edited by Excel-newbie-in-need; 05-27-2022 at 03:54 PM. Reason: New Info was added

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Counting numbers above a certain value from within a table.

    What result are you expecting in the sample workbook? You haven't told us.

    All you have given us is this:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    1
    Day
    Scheldue
    Night-time hrs
    2
    1
    15:00 - 23:30
    Sheet: Sheet1

    One row of data does not even match your attempted formula.

    I think you need to provide a more detailed sample workbook, please.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 04-18-2019, 01:35 AM
  2. Counting like numbers as 1 in a pivot table
    By BadKornFlake in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 11-16-2015, 10:59 AM
  3. Replies: 3
    Last Post: 10-30-2014, 03:57 PM
  4. count alphanumeric codes only counting odd numbers not even numbers?
    By JACKBKNIMBLE in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-25-2013, 02:43 PM
  5. pivot table counting blank cells in data table
    By nicko54 in forum Excel General
    Replies: 4
    Last Post: 09-23-2008, 11:26 AM
  6. Replies: 2
    Last Post: 09-23-2008, 11:01 AM
  7. [SOLVED] Counting numbers in a table
    By Arwes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2005, 06:06 PM

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