Formula to Return Cell Addresses Based on Multiple Mapping Criteria

mysites

New Member
Joined
Jul 12, 2017
Messages
7
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.
 
Last edited by a moderator:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I learned that the MATCH function can't take multiple addresses as input, so this wouldn't work. I've created a new thread with the new requirements of the formula. This thread can be deleted or closed.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top