redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,604
- Office Version
- 365
- Platform
- Windows
Hi all
I have a simple Data table and I'd like a formula to check down column F (Sales) for any value greater than Zero if the date in column H (Column2) matches the date held in cell ref J2
I have tried
=COUNTIFS(Data_Table[[#Headers],[SALES]], ">0", Data_Table[[#Headers],[Column2]], "="&J2)
but the retuen value is 0 in cell I2, where I would expect it to be 6 given the example data here..
I'm guessing its something to do perhaps with the way that column H and J2 is formatted to give the value as mmmm yyyy but can't figure it out
Appreciate any help
I have a simple Data table and I'd like a formula to check down column F (Sales) for any value greater than Zero if the date in column H (Column2) matches the date held in cell ref J2
I have tried
=COUNTIFS(Data_Table[[#Headers],[SALES]], ">0", Data_Table[[#Headers],[Column2]], "="&J2)
but the retuen value is 0 in cell I2, where I would expect it to be 6 given the example data here..
NDA.v14.xlsm | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | DATE | MONTH | YEAR | YEAR2 | Q | SALES | DAY | Column2 | Column3 | 0 | ||
2 | 01-Jan-20 | Jan | 2019-20 | 2020 | Q1 | Wed | January 2020 | 0 | January 2020 | |||
3 | 02-Jan-20 | Jan | 2019-20 | 2020 | Q1 | 140 | Thu | January 2020 | ||||
4 | 03-Jan-20 | Jan | 2019-20 | 2020 | Q1 | Fri | January 2020 | |||||
5 | 04-Jan-20 | Jan | 2019-20 | 2020 | Q1 | 70 | Sat | January 2020 | ||||
6 | 05-Jan-20 | Jan | 2019-20 | 2020 | Q1 | 70 | Sun | January 2020 | ||||
7 | 06-Jan-20 | Jan | 2019-20 | 2020 | Q1 | 960 | Mon | January 2020 | ||||
8 | 07-Jan-20 | Jan | 2019-20 | 2020 | Q1 | 2000 | Tue | January 2020 | ||||
9 | 08-Jan-20 | Jan | 2019-20 | 2020 | Q1 | Wed | January 2020 | |||||
10 | 09-Jan-20 | Jan | 2019-20 | 2020 | Q1 | 70 | Thu | January 2020 | ||||
Data |
Cell Formulas | ||
---|---|---|
Range | Formula | |
J1 | J1 | =COUNTIFS(Data_Table[[#Headers],[SALES]], ">0", Data_Table[[#Headers],[Column2]], ">"&J3) |
B2:B10 | B2 | =IF(ISBLANK(A2),"",TEXT([@DATE],"mmm")) |
C2:C10 | C2 | =IF(ISBLANK(A2),"",YEAR(EOMONTH(A2,9))-1&"-"&RIGHT(YEAR(EOMONTH(A2,9)),2)) |
D2:D10 | D2 | =IF(ISBLANK(A2),"",YEAR(A2)) |
E2:E10 | E2 | =IF(ISBLANK(A2),"",VLOOKUP(B2,Workings!$A$4:$C$15,3,FALSE)) |
G2:G10 | G2 | =IF(ISBLANK(A2),"",TEXT(A2,"DDD")) |
H2:H10 | H2 | =IF(ISBLANK(A2),"",A2) |
I2 | I2 | =COUNTIFS(Data_Table[[#Headers],[SALES]], ">0", Data_Table[[#Headers],[Column2]], ">"&J2) |
I'm guessing its something to do perhaps with the way that column H and J2 is formatted to give the value as mmmm yyyy but can't figure it out
Appreciate any help