VBA to replace vlookup or countIf due to extensive llist

Blanchetdb

Board Regular
Joined
Jul 31, 2018
Messages
153
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I created comboboxes with dropdown lists

I presently have formulas that searches through a long list (7000) of names and then once found information is auto-populated in identified cells

This is the search mechanism I presently have in place

In Column K:
=--ISNUMBER(SEARCH(Sheet3!$A$10,Sheet15!A2)) the next formula

In Column L:
=IF(K2=1,COUNTIF($K$2:$K2,1,"")

In Column M:
=IFERROR(INDEX($A$2:$A$7000,MATCH(ROWS($L$2:$L2),$L$2:$L$7000,0)),"")

the ComboBoxes provide a searchable dropdown list to choose from but the process is delayed

Can VBA speed up the process?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Re: VBA to replace vllokup or countIf due to extensive llist

Hi,

Do you actually need 7'000 rows ...?

With VBA you could use Evaluate to work out the formulas in Column M

Hope this will help
 
Upvote 0
Re: VBA to replace vllokup or countIf due to extensive llist

Hi,

I do require the 7000 as it is an employee listing

Not sure what the evaluate option is .... can you please provide an example
 
Upvote 0
Re: VBA to replace vllokup or countIf due to extensive llist

Hi,

As an example... you could test

Code:
Sub TestEvaluate()
MsgBox Evaluate("=INDEX($A$2:$A$7000,MATCH(ROWS($L$2:$L2),$L$2:$L$7000,0))")
End Sub

Hope this will help
 
Upvote 0
Re: VBA to replace vllokup or countIf due to extensive llist

Once you have tested the Evaluate instruction ... you can post your feedback ...
 
Upvote 0
Re: VBA to replace vllokup or countIf due to extensive llist

thanks for the example but I never used the evaluate function...

Do I link it to the ComboBox or in a separate module
 
Upvote 0
Re: VBA to replace vllokup or countIf due to extensive llist

Glad to hear it does help you out ...

There is no need for a separate module ...
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,170
Members
448,870
Latest member
max_pedreira

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