Created
December 18, 2024 11:26
-
-
Save monotykamary/d52eff16e7fd079c8ea1ce7befdfb3bd to your computer and use it in GitHub Desktop.
Excel/Sheets distribute value through Indirect count and substitution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =ARRAYFORMULA( | |
| SUM( | |
| IF( | |
| INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(),4), "1", "") & "2:" & SUBSTITUTE(ADDRESS(1,COLUMN(),4), "1", "") & COUNTA($A:$A)) = "x", | |
| INDIRECT("$R2:$R" & COUNTA($A:$A)) / | |
| INDIRECT("$Q2:$Q" & COUNTA($A:$A)), | |
| 0 | |
| ) | |
| ) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =ARRAYFORMULA( | |
| SUM( | |
| IF( | |
| INDIRECT("B2:B" & COUNTA(A:A)), | |
| INDEX( | |
| INDIRECT("O2:O" & COUNTA(A:A)) / | |
| COUNTIF( | |
| INDIRECT("B2:K" & COUNTA(A:A)), | |
| "x" | |
| ), | |
| ), | |
| 0 | |
| ) | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment