+ Reply to Thread
Results 1 to 3 of 3

Code to lookup values in x and y co-ordinates and return value in that co-ordinate

  1. #1
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2010
    Posts
    179

    Code to lookup values in x and y co-ordinates and return value in that co-ordinate

    Hi all,

    So I have a matrix of values on one sheet called 'Yield Loss Costs'. The matrix has labels for each row and column. I have created a form (access by 'Cost Calculator', then click the button to enter operations) where a user will select the labels from a listbox (first the melt route, and then, after checking the yield loss box, the stage). I would like a code that will find the associated x co-ordinate and y co-ordinate of these values and then return the cost from the matrix. Currently, I am trying to execute the code using 'SelectionConfirm_Click()'. This would paste the formula into cell C6 in excel, but ideally, this would all be done in VBA and only the value would be passed into the cell, not the formula.

    I hope someone can help. Please see attached file:

    Costs Matrix Example.xlsm

    Thanks in advance.
    Did I help? Click *- add to my rep.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Code to lookup values in x and y co-ordinates and return value in that co-ordinate

    Hi

    Bit of a cheat but here goes.

    Please Login or Register  to view this content.
    rylo

  3. #3
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2010
    Posts
    179

    Re: Code to lookup values in x and y co-ordinates and return value in that co-ordinate

    [QUOTE=rylo;3207407]Hi

    Bit of a cheat but here goes.

    Please Login or Register  to view this content.
    Good thinking! I have came up with something that works with vba but I can see that this would work. Cheers rylo

+ 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