I have a sheet where I'd like to divide values listed in one column (col A) by a value of 1-6 depending on whether any of 6 conditions (in cols B - G) are true or false for the value in a given row.
I'm currently doing this with an individual formula per row, counting up the number of true conditions and then using that as the divisor. So for row 2, the formula would be:
=A2/COUNTIF((B2:G2),TRUE)
But I'm wondering if it's possible to get the job done with a single array formula that can be extended down through the rows. Something like:
=ARRAYFORMULA(A2:A27/COUNTIF((B2:G2),TRUE))
However, I can't find a way to make the COUNTIF formula work in this case ... it always uses the value for either just the first row or an entire array, rather then one row at a time for each row.
Hope that makes sense. Here is an example sheet to better visualize the issue.
Appreciate any input!
But I'm wondering if it's possible to get the job done with a single array formula that can be extended down through the rows
? Because using the =ARRAYFORMULA(A2/COUNTIF((B2:G2),TRUE)) and then with the mouse copying the function trough the rows works - Kessy