Natively you can't but you could try to bypass it with either:
Exclude a single cell:
If you want to exclude a certain cell from a MATCH
you can exclude it's certain row number like so:
=MATCH(1,(A1:A20="X")*(ROW(A1:A20)<>8),0)
Or
=MATCH(1,INDEX((A1:A20="X")*(ROW(A1:A20)<>8),),0)
Both are array formulas but only the first one needs to be confirmed by holding down Ctrl+Shift before pressing Enter
Exclude a range of cells:
If you would want to exclude a range of rows, e.g. 8-12, then we cannot use the AND
or OR
logic as they don't return an array. However, we can mimic it ourselves like:
=MATCH(1,(A1:A20="x")*((ROW(A1:A20)<8)+(ROW(A1:A20)>12)),0)
Or
=MATCH(1,INDEX((A1:A20="x")*((ROW(A1:A20)<8)+(ROW(A1:A20)>12)),),0)
Where, again, both are array formulas but only the first one needs to be confirmed by holding down Ctrl+Shift before pressing Enter
Alternative
Alternatively, you could stack MATCH
functions in a number of ways, but here is one of them:
=IFERROR(MATCH("x",A1:A7,0),MATCH("x",A13:A20,0))
- Pro: No array formula > Fast!
- Con: Will return a match's relative row position in either the first or second range. In this example you could just add 12 to the second result.
Good luck =)
Match()
, but the official Union operator is,
. So it should beA1:A7, A9:A20
– Edwinaedwine=SUM(F2:F4, S2:S4)
. Web is full of examples: learn.microsoft.com/en-us/office/vba/api/… or dailydoseofexcel.com/archives/2005/01/16/union-and-intersect – EdwinaedwineMATCH
is not one of these. This question and answer cleared it up. – ForeignismA1:A20
then subtractA8
afterwards? – Wheelman