ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   From SUMIF to COUNTIF (https://www.excelbanter.com/excel-worksheet-functions/191723-sumif-countif.html)

Jennie

From SUMIF to COUNTIF
 
Hello,

Can anyone help me please?
I need a formula to count non blank cells within a rolling year. (The dates
are in the top row, and the days/occassions sick are in the rows below)

My initial formula: =SUMIF(($S$1:$IV$1=TODAY()-365)*S2:IV2) adds up
all the figures (total days sick) correctly within the rolling 12 months,
but I also need to count the non blank cells (occasions) for the same
condition. i.e if someone has been off sick for 4 days in one week I want
excel to count this as 1 rather than 4.
I thought that by changing 'SUMIF' to 'COUNTIF' would work, but it doesn't.

Any ideas?

Jennie




All times are GMT +1. The time now is 02:18 PM.

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