I have a spreadsheet that creates a hyperlink when the VLOOKUP finds a partial match from one column. This one column is called FILE LIST. The FILE LIST contains 20,000 rows. My spreadsheet is slowing down. I was told it would be better if I change from VLOOKUP to INDEX. I'm not familiar with INDEX at all. But how do I do that?

My formula right now is this:

=IFERROR(HYPERLINK("\\oes-cityhall\DATA\CITYWIDE\public\fppc filings\2013\" & 
            VLOOKUP(CONCATENATE("*"&B9&"*"),FileName!D:D,1,FALSE),2013),"")
有帮助吗?

解决方案

You can actually drop the CONCATENATE. It won't change much, but it's an additional processing all the same:

=IFERROR(HYPERLINK("\\oes-cityhall\DATA\CITYWIDE\public\fppc filings\2013\" & 
        INDEX(FileName!D:D,MATCH("*"&B9&"*",FileName!D:D,0)),2013),"")

Also, if you have the exact number of rows, use that. For instance, if you have 25000 rows, use:

=IFERROR(HYPERLINK("\\oes-cityhall\DATA\CITYWIDE\public\fppc filings\2013\" & 
   INDEX(FileName!D$1:D$25000,MATCH("*"&B9&"*",FileName!D$1:D$25000,0)),2013),"")

The formula is a little longer, but it will definitely take less time (it will shorten the time whenever there's no match, since as long as it finds no match, it will keep looking into the other cells).


To name the hyperlink as the matched result, you'd repeat the INDEX formula:

=IFERROR(HYPERLINK("\\oes-cityhall\DATA\CITYWIDE\public\fppc filings\2013\" & 
   INDEX(FileName!D$1:D$25000,MATCH("*"&B9&"*",FileName!D$1:D$25000,0)),
   INDEX(FileName!D$1:D$25000,MATCH("*"&B9&"*",FileName!D$1:D$25000,0))),"")

If B9 is blank, then:

=IFERROR(HYPERLINK("\\oes-cityhall\DATA\CITYWIDE\public\fppc filings\2013\" & 
   INDEX(FileName!D$1:D$25000,IF(B9="",NA(),MATCH("*"&B9&"*",FileName!D$1:D$25000,0))),
   INDEX(FileName!D$1:D$25000,IF(B9="",NA(),MATCH("*"&B9&"*",FileName!D$1:D$25000,0)))),"")

其他提示

replace your vlookup with something like this:

INDEX(Filename!E:E,MATCH(CONCATENATE("*"&B9&"*"),FileName!D:D,0))

EDIT

My mistake. I misread the 1 as a 2 in the vlookup.

This should work:

INDEX(Filename!D:D,MATCH(CONCATENATE("*"&B9&"*"),FileName!D:D,0))
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top