MATCH returning #N/A by mistake

AVO051

New Member
Joined
Jun 21, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi, the following formula is returning an #N/A error, but when I replace the offset formula by a cell range - which is automatically generated using the same formula - the match returns 1. I cannot understand why this is happening, especially since I have a similar formula in another sheet that works perfectly well.

=MATCH(Kalender_KamerRef;OFFSET(Lijst_Kamers;;MATCH(Legende!$F$5;OFFSET(Lijst_Kamers;-1;;1);0)-1;;1)) = #N/A error
=OFFSET(Lijst_Kamers;;MATCH(Legende!$F$5;OFFSET(Lijst_Kamers;-1;;1);0)-1;;1) = {0;0;0;4}
=MATCH(Kalender_KamerRef;{0;0;0;4};0) = 1

How can I correct this? Thanks for your input!


 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I can only see 1 difference between the 2 ways of doing it and that shouldn't cause your issue.
(your broken down formula has ";0" on the end which the main formula does not - but that should be the default anyway)

What is the:
• The value of Kalender_KamerRef
• The value of Legende!$F$5
• the range Lijst_Kamers - preferably also provide an XL2BB sample of this table.
Since you have MS365, I am surprised you need to use Offset at all.
 
Upvote 0
Thanks Alex! I found the following workaround that works:
MATCH(Kalender_KamerRef;IF({1};OFFSET(Lijst_Kamers;;MATCH(Legende!$F$5;OFFSET(Lijst_Kamers;-1;;1);0)-1;;1));0)

The ";0" was always there, but somehow got lost during copy/paste.

PS: This is an older Excel file (prior to MS365) that I copied from a previous project, hence the offset 😉
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,578
Members
449,174
Latest member
chandan4057

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