ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   translate ws formula to vba code (https://www.excelbanter.com/excel-programming/358995-translate-ws-formula-vba-code.html)

L Scholes

translate ws formula to vba code
 
Can someone please translate this worksheet formula to vba code?

=NameList,INDEX(NameColumn,MATCH(A2,BadgeColumn,0) )

The formula does what I need it to do, but I am trying to create a
userform with comboxes and need the second combobox to do this based on
information supplied in the first combobox.

Thank you in advance!


Bob Phillips[_6_]

translate ws formula to vba code
 
Activesheet.Evaluate("=NameList,INDEX(NameColumn,M ATCH(A2,BadgeColumn,0))")

either that or use FIND to find A2 in BadgeColumn, then pick up that cell in
NameColumn. What is NameList?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"L Scholes" wrote in message
oups.com...
Can someone please translate this worksheet formula to vba code?

=NameList,INDEX(NameColumn,MATCH(A2,BadgeColumn,0) )

The formula does what I need it to do, but I am trying to create a
userform with comboxes and need the second combobox to do this based on
information supplied in the first combobox.

Thank you in advance!




L Scholes

translate ws formula to vba code
 
I am trying to create two dependant comboboxes on a userform, cboOff
and cboNam. I currently have a data validation cell on my worksheet
with BadgeList as the named function to populate that list. Then, in
A2, I have the formula above to supply the name of the officer (from
NameList) with that badge number. I am trying to transfer over to
UserForm to get the same thing, I just can't get the comboboxes to be
dependant on one another???
Thank you!



All times are GMT +1. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com