Hello,
I am struggling with the syntax to combine a COUNTIF function with an INDIRECT function embedded within (or something similiar). Here's my current formula in cell B1:
=IF(A1 = "all",COUNTIFS(Sheet1!Q:Q , Sheet2!M4))
(If A1 in the current sheet = "all", then run a countif to see how many instances of Sheet2!M4 exist within column Q in Sheet1)
What I would like to do is store text in different cells that I could "tack on" to this formula as needed. E.g. Cell A2 contains the text ",Sheet1!R:R, "<>" & "exclude". Then, in my main countifs formula in B1, I'd like to be able to reference Cell A2 in order to add more criteria to the countifs. So, something like =IF(A1 = "all",COUNTIFS(Sheet1!Q:Q , Sheet2!M4 & A2)) would actually be read as =IF(A1 = "all",COUNTIFS(Sheet1!Q:Q , Sheet2!M4 , Sheet1!R:R , "<>" & "exclude"))
I've tried various combinations of using INDIRECT with no luck. Any insight is greatly appreciated - thank you!
I am struggling with the syntax to combine a COUNTIF function with an INDIRECT function embedded within (or something similiar). Here's my current formula in cell B1:
=IF(A1 = "all",COUNTIFS(Sheet1!Q:Q , Sheet2!M4))
(If A1 in the current sheet = "all", then run a countif to see how many instances of Sheet2!M4 exist within column Q in Sheet1)
What I would like to do is store text in different cells that I could "tack on" to this formula as needed. E.g. Cell A2 contains the text ",Sheet1!R:R, "<>" & "exclude". Then, in my main countifs formula in B1, I'd like to be able to reference Cell A2 in order to add more criteria to the countifs. So, something like =IF(A1 = "all",COUNTIFS(Sheet1!Q:Q , Sheet2!M4 & A2)) would actually be read as =IF(A1 = "all",COUNTIFS(Sheet1!Q:Q , Sheet2!M4 , Sheet1!R:R , "<>" & "exclude"))
I've tried various combinations of using INDIRECT with no luck. Any insight is greatly appreciated - thank you!