I need a formula that returns a number of cell addresses/ranges based on multiple mapping criteria.
I have the following mapping dataset whose length may vary from day to day:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]Member Name[/TD]
[TD]Mapping 1[/TD]
[TD]Mapping 2
[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]Member1[/TD]
[TD]Group1[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]Member2[/TD]
[TD]Group2[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]Member3[/TD]
[TD]Group1[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]Member4[/TD]
[TD]Group2[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD]Member5[/TD]
[TD]Group1[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD]Member6[/TD]
[TD]Group2[/TD]
[TD]Map2[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD]Member7[/TD]
[TD]Group1[/TD]
[TD]Map2[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD]Member8[/TD]
[TD]Group2[/TD]
[TD]Map2[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD]Member9[/TD]
[TD]Group1[/TD]
[TD]Map2[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD]Member10[/TD]
[TD]Group2[/TD]
[TD]Map2[/TD]
[/TR]
</tbody>[/TABLE]
The member names are not numeric or alphabetical, so I need a formula that returns a series of addresses/ranges that can be used as Criteria inside of a SUMIF/SUMPRODUCT formula that I'll include below for reference. If I were to feed the formula the values "Group1" and "Map2" I'd expect the output to return the addresses A8 and A10.
These values will be passed to a SUMPRODUCT formula like the following:
=SUMPRODUCT(--(ISNUMBER(MATCH(HeaderRow,A8;A10,0))),--(ISNUMBER(MATCH(HeaderColumn,SomeRange,0))),DataRange)
Thanks!
Also it should be noted that the length of the mapping file may be shorter or longer than the length of my "HeaderRow" to which I compare it.
I have the following mapping dataset whose length may vary from day to day:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]Member Name[/TD]
[TD]Mapping 1[/TD]
[TD]Mapping 2
[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]Member1[/TD]
[TD]Group1[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]Member2[/TD]
[TD]Group2[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]Member3[/TD]
[TD]Group1[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]Member4[/TD]
[TD]Group2[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD]Member5[/TD]
[TD]Group1[/TD]
[TD]Map1[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD]Member6[/TD]
[TD]Group2[/TD]
[TD]Map2[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD]Member7[/TD]
[TD]Group1[/TD]
[TD]Map2[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD]Member8[/TD]
[TD]Group2[/TD]
[TD]Map2[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD]Member9[/TD]
[TD]Group1[/TD]
[TD]Map2[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD]Member10[/TD]
[TD]Group2[/TD]
[TD]Map2[/TD]
[/TR]
</tbody>[/TABLE]
The member names are not numeric or alphabetical, so I need a formula that returns a series of addresses/ranges that can be used as Criteria inside of a SUMIF/SUMPRODUCT formula that I'll include below for reference. If I were to feed the formula the values "Group1" and "Map2" I'd expect the output to return the addresses A8 and A10.
These values will be passed to a SUMPRODUCT formula like the following:
=SUMPRODUCT(--(ISNUMBER(MATCH(HeaderRow,A8;A10,0))),--(ISNUMBER(MATCH(HeaderColumn,SomeRange,0))),DataRange)
Thanks!
Also it should be noted that the length of the mapping file may be shorter or longer than the length of my "HeaderRow" to which I compare it.
Last edited by a moderator: