0

I have two worksheet named booklist and author.I am trying to get the Id of author from the worksheet author and use it in the boolist worksheet in the writer code column. I have written the formula like below-

=VLOOKUP(C2,author!A2:D419,1,0)

But it is not working kindly help me aht is wrong in this enter image description here enter image description here

It is showing error kindly help me to do that.

Gdfhj
  • 23
  • 8
  • =Vlookup() works left to right, not right to left. Depending on the version of office you are using ie: 365, =xlookup() would work. Other wise you could try =index(match) – Davesexcel Aug 23 '22 at 10:08

1 Answers1

1

VLOOKUP() will not work in this case because vlookup always look for value in first column and return data from another column of corresponding row. You author sheet first column is ID and you are looking for writer name. So, it will never match. Try below formula instead.

=INDEX(author!$A$2:$A$500,MATCH(C2,author!$C$2:$C$500,0))

Or XLOOKUP() like-

=XLOOKUP(C2,author!$C$2:$C$500,author!$A$2:$A$500)
Harun24hr
  • 30,391
  • 4
  • 21
  • 36