I've got data stored on multiple worksheets in Excel. Each worksheets has the exact same data structure.
I am trying to make a script, that makes me a nice summery view on another worksheet.
This worksheet has the worksheet names listed on column 1 and I want to count rows that satisfy specific conditions. I managed to get a countifs function produced that counts rows for which a specific column has the TRUE logical value, but I have date and time values as well, and I want to count ones between two specific dates. What do I get wrong?
for i = [got the range right here]
wsOverview.cells(i, 2).Formula = "=countifs(" & ThisWorkbook.sheets(wsOverview.cells(i, 1).value).Range("AI:AI").Address(external:=True) & ","">""" & wsOverview.cells(1,2).value & ")"
next i
(this is an attempt at the date greater than criteria, I don't bother with the maximal date value until i manage to get this right.)
The problem is somewhere in the last part, because replacing "">""" & wsOverview.cells(1,2).value with TRUE and the AIs with the column that has boolean data yields results.
& ", "">"" & A1)"? - GSerg