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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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