Forum Discussion
Matching two ranges
First argument in second match shall be scalar value, not the range. Plus it's not clear what you'd like to return by it, see formatted
=IFERROR(
INDEX(
county_reg!A:E,
(MATCH($B2,county_reg!B:B,0),
MATCH(county_reg!K2:K60,county_reg!C:C,0)
),
12),
"")
Plus it's better to use INDEX(E:E,...) instead of INDEX(A:E,...12).
- DebS32Sep 24, 2020Copper Contributor
I'm sorry I don't follow --
the data range for the index in county_reg is in columns B and C, for comparison to K so making it E:E doesn't help -
I think the problem is in the
MATCH(county_reg!K2:K60,county_reg!C:C,0)
but K2:K60 is the list of counties aligned to the region number for each county in column L (12) - and I'm trying to get it to recognize each county listed multiple times in column C against the individual county in column K to put the county number in column L/12 back on the master data file on CA Comp...
- PReaganSep 24, 2020Bronze Contributor
I'm sorry, I'm having a difficult time visualizing what you are trying to achieve. Perhaps you could share a sample file of your data set? (removing any sensitive information - of course)
Just as a note, unless you are using MATCH() as an array formula, then the lookup_value must be a single value and not a range.