ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional date array formula (https://www.excelbanter.com/excel-discussion-misc-queries/111241-conditional-date-array-formula.html)

caj

Conditional date array formula
 
This is the formula:

=IF(ISERROR(INDEX(Log!$A$1:$A$2000,SMALL(IF((Log!$ B$1:$B$2000=$Q$1)*(Log!$B$1:$B$2000<=$Q$2),ROW(Lo g!B$1:B$2000)),ROWS($1:2)))),"
",INDEX(Log!$A$1:$A$2000,SMALL(IF((Log!$B$1:$B$200 0=$Q$1)*(Log!$B$1:$B$2000<=$Q$2),ROW(Log!B$1:B$20 00)),ROWS($1:1))))

Log contains the raw data
Q1 = date of beginning of month
Q2 = date of end of month
This formula enters info on a sheet called Monthly Log

The formula works.

The problem is -- it doesn't pull the last entry for the month no matter
what day of the month it is. How do I fix this?

Biff

Conditional date array formula
 
The only thing I see is that your ROWS() functions aren't the same:

In the error trap it's:

ROWS($1:2)

And in the main segemnt it's:

ROWS($1:1)

Make them both the same:

ROWS($1:1)

Biff

"caj" wrote in message
...
This is the formula:

=IF(ISERROR(INDEX(Log!$A$1:$A$2000,SMALL(IF((Log!$ B$1:$B$2000=$Q$1)*(Log!$B$1:$B$2000<=$Q$2),ROW(Lo g!B$1:B$2000)),ROWS($1:2)))),"
",INDEX(Log!$A$1:$A$2000,SMALL(IF((Log!$B$1:$B$200 0=$Q$1)*(Log!$B$1:$B$2000<=$Q$2),ROW(Log!B$1:B$20 00)),ROWS($1:1))))

Log contains the raw data
Q1 = date of beginning of month
Q2 = date of end of month
This formula enters info on a sheet called Monthly Log

The formula works.

The problem is -- it doesn't pull the last entry for the month no matter
what day of the month it is. How do I fix this?





All times are GMT +1. The time now is 01:15 AM.

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