+ Reply to Thread
Results 1 to 2 of 2

Help needed with userform label and Index/Match

  1. #1
    Registered User
    Join Date
    07-23-2015
    Location
    United States
    MS-Off Ver
    MS Office 2010
    Posts
    2

    Help needed with userform label and Index/Match

    Hi all,
    I'm looking for some help with getting userform label's caption to be the result of an index/match formula.

    Here's the setup:
    Two sheets, each with a table.
    Sheet1 has Table1, Sheet2 has Table2.
    Both tables are generally set up the same as far as column titles go.
    The userform is opened by double-clicking a student's name in the Table1[Student Name] column (Column "A").
    On my userform I have two columns of labels set up. The first column represents a student's current grade (LblCurrGrade) from Table1[Student Grade], the second column needs the student's previous grade (LblPrevGrade) from Table2[Student Grade].

    Given that the userform is called by double clicking on the a name in Table1[Student Name], the label of LblCurrGrade is simple enough by writing the code as:
    Code:

    Please Login or Register  to view this content.
    I'm struggling on how to write the code to pull in that student's previous grade as scene on Sheet2/Table2. I'm assuming there could be a way to use Index/Match to grab this grade based on matching the Student Names from each table, but not sure if that's correct or how to write it to avoid errors.

    Also, if there's a way to refer to the table field rather than "Cells(ActiveCell.Row, "A").Value", it would be ideal given that some users may alter the column placements in the tables.

    Any suggestions?

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Help needed with userform label and Index/Match

    This 2 information:
    * student's name in the Table1[Student Name] column (Column "A").
    * the label of LblCurrGrade is simple enough by writing the code as:
    Please Login or Register  to view this content.
    Seem inconsistant - looks like Both name & current grade are stored in column A.
    May be you could attach a SMALL sample Excel workbook(s) (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. (If trere are typical cases like: all unique values/duplicates could occur, day/night, nobody present/several persons at once, before/on/past due, etc. - please show them all or at least indicate in text) The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution(s) is/are also shown (mock up the results manually).

    3. Make sure that all confidential/restricted information (either personal or business) like real e-mails, social security numbers, bank accounts, etc. is removed first!!

    To attach an Excel file you have to do the following: Just before posting, scroll down and press Go Advanced button and then scroll down and press Manage Attachments link. Now follow the instructions at the top of that pop-up screen.
    Best Regards,

    Kaper

+ 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] Match and index needed (I think)
    By Agnese in forum Excel General
    Replies: 2
    Last Post: 03-15-2016, 07:50 AM
  2. unable to get match property error in userform derived index match
    By alexcrofut in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2015, 09:21 PM
  3. [SOLVED] index match help needed
    By krish2503 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-02-2015, 09:29 AM
  4. Replies: 2
    Last Post: 09-27-2014, 04:34 PM
  5. Index Match help needed
    By SKIDDERWOLF in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-14-2013, 04:19 AM
  6. Help needed with INDEX MATCH...
    By Nerf Herder in forum Excel General
    Replies: 4
    Last Post: 06-27-2012, 04:40 AM
  7. [SOLVED] Index and Match Help Needed
    By carl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-26-2005, 05:05 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