Link to home
Create AccountLog in
Avatar of kbay808
kbay808Flag 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)),"")
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of kbay808

ASKER

Can the range be replaced with a variable so that the result will be in a string?
If you mean replacing the range AQ3:AQ10 with a string variable containing the range address, yes you can do that.
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
Avatar of 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