Way to overcome Excel Vlookup function limit of 256 characters

前端 未结 3 1348
粉色の甜心
粉色の甜心 2020-12-14 04:16

I have a excel array with multiple values. Some are less than 256 characters and some have a length greater than 256.

When I tried to do a VLookup using a sample str

3条回答
  •  没有蜡笔的小新
    2020-12-14 04:36

    If you are using VLOOKUP like this

    =VLOOKUP(A2,D2:Z10,3,FALSE)

    i.e. looking up A2 in D2:D10 and returning a result from F2:F10 then try this formula instead

    =INDEX(F2:F10,MATCH(TRUE,INDEX(D2:D10=A2,0),0))

    change ranges as required

    Edit:

    I mocked up a sample here - values in A2:A10 are the same as G2:G10 but in a different order. The length of each of those values is shown in column B, the VLOOKUP in column C fails on col A values > 255 chars but the INDEX/MATCH formula in col D works in all cases

    https://www.dropbox.com/s/fe0sb6bkl3phqdr/vlookup.xls

提交回复
热议问题