I am trying to count the number of rows in a different sheet containing a value.
In sheet 2 I have sales dates in column "A". In sheet 1 I want to count the number of sales for 2024.
So I wanted to use YEAR() around the range which does not seem to work. I then tried using the range containg the sales date with the AND() wrapped around the two conditions without success. Seems like a reasonable request but can't seem to come up with the correct formula.
The solution is probably simple, but I have not stumbled on a solution yet.
BTW the year 2024 is stored in "Sheet 1"!J2 but have it hard coded above to try to get a solution.
TIA, Mark
In sheet 2 I have sales dates in column "A". In sheet 1 I want to count the number of sales for 2024.
So I wanted to use YEAR() around the range which does not seem to work. I then tried using the range containg the sales date with the AND() wrapped around the two conditions without success. Seems like a reasonable request but can't seem to come up with the correct formula.
Code:
=COUNTIF(YEAR('Sheet 2'!A$6:A$999),2024)
=COUNTIFS(YEAR('Sheet 2'!A$6:A$999),'=2024')
=COUNTIFS('Sheet 2'!A$6:A$999,AND(">=01/01/2024","<=12/31/2024"))
BTW the year 2024 is stored in "Sheet 1"!J2 but have it hard coded above to try to get a solution.
TIA, Mark