+ Reply to Thread
Results 1 to 3 of 3

Find cell in 2nd array using row and column from the first array Excel 2010 VBA

  1. #1
    Registered User
    Join Date
    08-07-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    21

    Find cell in 2nd array using row and column from the first array Excel 2010 VBA

    Find cell in 2nd array using row and column from the first array

    I am having trouble getting data from 2 sources using VBA.

    See the linked worksheet for the data I am querying.

    I have a userform that has the ranks_textbox with "7 _ 6" in it.
    I use that value to determine the row in rank_v_rank it resides in. (row 3 in the example)

    Another textbox on the form has the score_textbox with "5 _ 3" in it.
    I then need to find column in that row that the value of the score_textbox has. (col F in the example)

    What I can't seem to figure out how to get.. is the data for the points_textbox.
    That would be the "2 _ 1" in row 3 col Q.

    I am doing this programmatically in Excel 2010 VBA.


    Example;

    ranks_textbox.value = "7 _ 6"
    Score_combobox.value = "5 _ 3"
    I need to get "2 _ 1" from poss_scores into the points_textbox

    The following are the involved named ranges.

    rank_v_rank =Data!$G$2:$G$43
    poss_scores =Data!$I$2:$R$43
    poss_points =Data!$t$2:$AC$43
    link to workbook example; https://www.dropbox.com/s/9gqh7f3fa5...ook1.xlsx?dl=0
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Find cell in 2nd array using row and column from the first array Excel 2010 VBA

    worksheet formulas:
    find the row:
    Please Login or Register  to view this content.
    find the column:
    Please Login or Register  to view this content.
    return poss_points:
    Please Login or Register  to view this content.


    named ranges:
    _ColumnPointer wrt: =Sheet2!$D$4
    _RowPointer wrt: =Sheet2!$D$3
    poss_points (modified) wrt: =Sheet2!$T$2:INDEX(Sheet2!$T:$AC,COUNTA(Sheet2!$T:$T),)
    poss_scores (modified) wrt: =Sheet2!$I$2:INDEX(Sheet2!$I:$R,COUNTA(Sheet2!$I:$I),)
    rank_v_rank (modified) wrt: =Sheet2!$G$2:INDEX(Sheet2!$G:$G,COUNTA(Sheet2!$G:$G)-1)


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    08-07-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    21

    Re: Find cell in 2nd array using row and column from the first array Excel 2010 VBA

    You da MAN ! ! !
    minor changes to use by vars and all working perfect.
    Many thanks..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] 2 Column Lookup with 6 Column array Col index number is Varies Within Entire Array
    By Weasyb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-05-2015, 12:54 PM
  2. VBA Excel 2010 - Dictionary with Array Suppress duplicates plus sum amount column
    By ffasan in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-25-2014, 05:30 AM
  3. [SOLVED] Find Data in one array and match the position in another array
    By zeeman2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-27-2013, 07:55 PM
  4. Find a value in an array and return multiple values in an adjacent array
    By tonbra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2012, 08:35 PM
  5. For Each Cell.Value within a 1D array, find each instance within a 2D array.
    By whilburn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2010, 04:51 PM
  6. find each of the items in an array and save result in another array
    By lif in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2006, 08:54 PM

Tags for this Thread

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