excelmonky12345
New Member
- Joined
- Sep 22, 2023
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
- MacOS
I'm trying to SUMIF values in another sheet (therefore the indirect), however the keys are different so I need to map the keys (therefore the Index Match)).
Suppose there are two sheets, sheetA and sheetB and sheetC
sheetA is below, I'm trying to fill out Total Money
sheetB is as follows:
Sheet C is a map
Essentailly, in my model I have a ton of sheetB's and only 1 sheetA, so we must map the keys in sheetB to correspond to sheetA (rather than vice versa). And I'm using a formula to write many indirects. But for the sake of example,
=SUMIFS(INDIRECT(F2),INDEX(sheetC!$B$2:$B$3,MATCH(INDIRECT(E2),sheetC!A2:A3,0)),A2)
The above formula should return a value, but it instead returns an array and I'm really flabbergasted as to why.
The problem is the indirect in the index match formula, if we seperate that out and do:
=SUMIFS(INDIRECT(F2),E12#,A2)
Where E12# is the formula: =INDEX(sheetC!$B$2:$B$3,MATCH(INDIRECT(E2),sheetC!A2:A3,0))
The formula works perfectly fine. But this just confuses me more, because all I've done is broken the formula into two parts.
Does anyone understand why it might not be working as we might want?
Suppose there are two sheets, sheetA and sheetB and sheetC
sheetA is below, I'm trying to fill out Total Money
Person | Total Money |
Tim | |
Bob |
sheetB is as follows:
Person | Money |
Timothy | 5 |
Robert | 1 |
Robert | 1 |
Timothy | 5 |
Sheet C is a map
Key1 | Key2 |
Timothy | Tim |
Robert | Rob |
Essentailly, in my model I have a ton of sheetB's and only 1 sheetA, so we must map the keys in sheetB to correspond to sheetA (rather than vice versa). And I'm using a formula to write many indirects. But for the sake of example,
=SUMIFS(INDIRECT(F2),INDEX(sheetC!$B$2:$B$3,MATCH(INDIRECT(E2),sheetC!A2:A3,0)),A2)
The above formula should return a value, but it instead returns an array and I'm really flabbergasted as to why.
The problem is the indirect in the index match formula, if we seperate that out and do:
=SUMIFS(INDIRECT(F2),E12#,A2)
Where E12# is the formula: =INDEX(sheetC!$B$2:$B$3,MATCH(INDIRECT(E2),sheetC!A2:A3,0))
The formula works perfectly fine. But this just confuses me more, because all I've done is broken the formula into two parts.
Does anyone understand why it might not be working as we might want?