0

I've problem with Microsoft Excel HLOOKUP function as below

Problem

As you can see, the result is #N/A for function that set true as lookup range

Where I'm expecting is should be 25 since it should find Mangga correctly (Like when it's false)

But searching Semangka would be as expected

Semangka

Is there something that I miss?

Thanks and regards,

1 Answers1

1

While HLOOKUP() will work with Exact_Match you can also use INDEX/MATCH like-

=INDEX(A2:E5,2,MATCH(A7,A1:E1,0))

enter image description here

Harun24hr
  • 30,391
  • 4
  • 21
  • 36
  • Yes I know that, but my question is why my formula didn't worked as I expected – Adhi Kristianto Jun 24 '21 at 04:25
  • @AdhiKristianto `Approximate_Match` only works for sorted data. But `XLOOKUP()` works on unsorted data. – Harun24hr Jun 24 '21 at 04:28
  • But why searching Semangka will both give me 40 for both true and false. Question is updated – Adhi Kristianto Jun 24 '21 at 04:33
  • @AdhiKristianto Why not? You are referencing same row `3` for both formula and same column `Semangka`. `approximate_match` specially works for numeric value. If you want to teach your student about `approximae_match` then use numeric value instead of text. – Harun24hr Jun 24 '21 at 04:48
  • so the Nama toko, which is started with N, in the front are excused by the formula? Or it's just: The unsorted data, makes the result unpredicted? – Adhi Kristianto Jun 24 '21 at 04:58