ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count If value is greater than 12 and within the past 30 days (https://www.excelbanter.com/excel-worksheet-functions/454039-count-if-value-greater-than-12-within-past-30-days.html)

Vanessa Sales

Count If value is greater than 12 and within the past 30 days
 
I'm trying to create a spreadsheet and nothing I try is working and I have been at this for days now.

I need to count how many times in the last 30 days an employee has worked more than 12 hours.

I have it so that A3:A308 are dates (3/1/2018 through 12/31/2018) and the employee names are listed in the first row (just to test it out I'm using B1 through P1). Row 2 is where i want to insert the formula.

So for B3 through B308, I will enter number of hours worked each of those days.

I want B2 to tell me how many times in the last 30 days based on TODAY's date and the dates in A3:A308 that the value in B was greater than or equal to 12.

HELP PLEASE!!

Claus Busch

Count If value is greater than 12 and within the past 30 days
 
Hi Vanessa,

Am Thu, 29 Mar 2018 17:02:46 +0100 schrieb Vanessa Sales:

I need to count how many times in the last 30 days an employee has
worked more than 12 hours.

I have it so that A3:A308 are dates (3/1/2018 through 12/31/2018) and
the employee names are listed in the first row (just to test it out I'm
using B1 through P1). Row 2 is where i want to insert the formula.

So for B3 through B308, I will enter number of hours worked each of
those days.


try in B2:
=SUMPRODUCT(--($A$3:$A$308=TODAY()-30),--($A$3:$A$308<=TODAY()),--(B$3:B$308=12))
and copy to the right.


Regards
Claus B.
--
Windows10
Office 2016


All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com