Avatar of kbay808
kbay808
Flag for United States of America asked on

VBA-How to convert index, match formula from a cell to vba?

I have a user form dropdown list that is created by using the below formula in cells AQ3:AQ10.  It works, but on slower computers the list is populated before for cell is populated with the result. Causing the dropdown list to show only zeros.  I'm hoping to alleviate the issue by populating the cell via vba.

=IFERROR(INDEX($AK$3:$AK$201,MATCH(ROW()-ROW($AQ$2),$AI$3:$AI$200,0)),"")
VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
kbay808

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Subodh Tiwari (Neeraj)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
kbay808

ASKER
Can the range be replaced with a variable so that the result will be in a string?
Subodh Tiwari (Neeraj)

If you mean replacing the range AQ3:AQ10 with a string variable containing the range address, yes you can do that.
Roy Cox

I doubt that converting the formula to VBA will speed things up.

Maybe put a pause in the code to allow the function to complete
Your help has saved me hundreds of hours of internet surfing.
fblack61
kbay808

ASKER

Here is a better solution that I found to speed up my userform.

 

VBA: Multilevel dependent drop-down in User Form

https://www.youtube.com/watch?v=ERIFM_pp_2U