+ Reply to Thread
Results 1 to 3 of 3

translate ws formula to vba code

  1. #1
    L Scholes
    Guest

    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!


  2. #2
    Bob Phillips
    Guest

    Re: translate ws formula to vba code

    Activesheet.Evaluate("=NameList,INDEX(NameColumn,MATCH(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" <[email protected]> wrote in message
    news:[email protected]...
    > 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!
    >




  3. #3
    L Scholes
    Guest

    Re: 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!


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1