soulexistence
New Member
- Joined
- Mar 20, 2019
- Messages
- 2
The original formula looks like this:
<code>
=SUM(COUNTIFS(Details!$BA:$BA,"A",Details!$AZ:$AZ,">"&"2018-12-31",Details!$AZ:$AZ,"<"&"2019-4-1")+(COUNTIFS(Details!$BA:$BA,"N",Details!$AZ:$AZ,">"&"2018-12-31",Details!$AZ:$AZ,"<"&"2019-4-1")))
</code>
The purpose of this is to feed into charts from data on the Details page, counting A's and N's, which they use to mean complete. (I don't design the trackers, just try do the charts)
Because the client may ask for different columns to be included in the count I want this to be more dynamic. I have made the column headers dropdowns based on the Details page, and have a selector for what quarter the data will be based on. This example is Q1.
This is the formula I attempted to write to do all of this:
<code>
=SUM(COUNTIFS(INDIRECT("'Details'!"&B9:$B9),"A", INDIRECT("'Details'!"&$B8:$B8),">"& INDIRECT("INDEX('BuildData'!C4:C7,MATCH('Charts'!R7,'BuildData'!B4:B7))"), INDIRECT("'Details'!"&$B8:$B8),"<"& INDIRECT("INDEX('BuildData'!D4:D7,MATCH('Charts'!R7,BuildData!B4:B7)")) +COUNTIFS(INDIRECT("'Details'!"&$B9:$B9),"N", INDIRECT("'Details'!"&$B8:$B8),">"& INDIRECT("INDEX('BuildData'!C4:C7,MATCH('Charts'!R7,'BuildData'!B4:B7))"), INDIRECT("'Details'!"&$B8:$B8),"<"& INDIRECT("INDEX(BuildData!D4:D7,MATCH(Charts!R7,BuildData!B4:B7))")))
</code>
But the sticking points are with the "<" and the dates, because, as you can see in the original, they look like this: "<"&"2018-12-31"
So my question is how do i get the indirect to do that? I've tried "<" & char(34) & indirect...,
I've tried "<" & """ & Indirect..., I've tried moving the """ and &char(34) & around inside and outside Indirect to get it to work, but it doesn't.
<code>
=SUM(COUNTIFS(Details!$BA:$BA,"A",Details!$AZ:$AZ,">"&"2018-12-31",Details!$AZ:$AZ,"<"&"2019-4-1")+(COUNTIFS(Details!$BA:$BA,"N",Details!$AZ:$AZ,">"&"2018-12-31",Details!$AZ:$AZ,"<"&"2019-4-1")))
</code>
The purpose of this is to feed into charts from data on the Details page, counting A's and N's, which they use to mean complete. (I don't design the trackers, just try do the charts)
Because the client may ask for different columns to be included in the count I want this to be more dynamic. I have made the column headers dropdowns based on the Details page, and have a selector for what quarter the data will be based on. This example is Q1.
This is the formula I attempted to write to do all of this:
<code>
=SUM(COUNTIFS(INDIRECT("'Details'!"&B9:$B9),"A", INDIRECT("'Details'!"&$B8:$B8),">"& INDIRECT("INDEX('BuildData'!C4:C7,MATCH('Charts'!R7,'BuildData'!B4:B7))"), INDIRECT("'Details'!"&$B8:$B8),"<"& INDIRECT("INDEX('BuildData'!D4:D7,MATCH('Charts'!R7,BuildData!B4:B7)")) +COUNTIFS(INDIRECT("'Details'!"&$B9:$B9),"N", INDIRECT("'Details'!"&$B8:$B8),">"& INDIRECT("INDEX('BuildData'!C4:C7,MATCH('Charts'!R7,'BuildData'!B4:B7))"), INDIRECT("'Details'!"&$B8:$B8),"<"& INDIRECT("INDEX(BuildData!D4:D7,MATCH(Charts!R7,BuildData!B4:B7))")))
</code>
But the sticking points are with the "<" and the dates, because, as you can see in the original, they look like this: "<"&"2018-12-31"
So my question is how do i get the indirect to do that? I've tried "<" & char(34) & indirect...,
I've tried "<" & """ & Indirect..., I've tried moving the """ and &char(34) & around inside and outside Indirect to get it to work, but it doesn't.