ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count days (https://www.excelbanter.com/excel-programming/296095-count-days.html)

KES

Count days
 
Column A is a list of dates, and I only want to count the dates that are
older (or younger) than today. I want to compare against the system
date, so the count is dynamic depending on the day the data is
accessed. Also, in column B I have attributes Q or Z. I only want the
date total for rows containing Q, ignoring rows with Z.
I tried the following with no success. Open is the name of the
spreadsheet within the workbook, that contains the data.

=SUM(IF(Open!$B$3:$B$296="Q",IF(Open!$A$3:$A$296," "&TODAY,1,0),0)

Thanks.


---
Message posted from http://www.ExcelForum.com/


Bob Phillips[_6_]

Count days
 
=SUMPRODUCT((A3:A296<TODAY())*(B3:B296="Q"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"KES " wrote in message
...
Column A is a list of dates, and I only want to count the dates that are
older (or younger) than today. I want to compare against the system
date, so the count is dynamic depending on the day the data is
accessed. Also, in column B I have attributes Q or Z. I only want the
date total for rows containing Q, ignoring rows with Z.
I tried the following with no success. Open is the name of the
spreadsheet within the workbook, that contains the data.

=SUM(IF(Open!$B$3:$B$296="Q",IF(Open!$A$3:$A$296," "&TODAY,1,0),0)

Thanks.


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 12:04 PM.

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