+ Reply to Thread
Results 1 to 6 of 6

How do I find the adress that shares the column of a certain cell and row of another?

  1. #1
    Registered User
    Join Date
    10-28-2011
    Location
    Sweden
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    14

    Question How do I find the adress that shares the column of a certain cell and row of another?

    Help wanted!

    I am making an excel solution for a competition. The first sheet has a table of all the participants and all the courses in the competition.

    This is what the sheet looks like:

    [Number Input] [Name Input] [Answer Input] [BUTTON]
    Course: 1 2 3
    Number Name Start Finish Answer Start Finish Answer Start Finish Answer
    101 John Smith
    102 Jane Smith
    103 Harvey Dent

    The user inputs Number of participant, number of Course and maybe and Answer in the topmost input boxes and then presses a button that calls a sub.

    That sub is supposed to first find the cell in the "Start" column that corresponds to the course number and participant number inputted, and fill it with current time. If that is already done, then the next click it should fill the corresponding "Finish"-cell with the time. And if an Answer is given, the corresponding "Answer" cell with the answer input.


    How do I best go about this with VBA?

    All help greatly appreciated!
    Last edited by groznij; 05-12-2012 at 10:45 AM. Reason: Previous explanation was quite terrible

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Referencing an address with column of cell that matches one cell value and row of anot

    well, you could use the Cells(row,column) approach where the row/column come from the cells.find(what:="text to find in the worksheet").

    Please Login or Register  to view this content.


    -----Edit----
    Ok, i just posted my reply and now you've posted some code (which wasn't there a moment ago ) what exactly are you trying to do with that code?
    Last edited by GeneralDisarray; 05-10-2012 at 10:15 AM. Reason: OP changed their post: added code
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    10-28-2011
    Location
    Sweden
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    14

    Re: Referencing an address with column of cell that matches one cell value and row of anot

    Thanks! I shall see if I can make that work. Man, I have a lot to learn. At least I'm learning quickly... the code I was making a few days ago seems archaic, and now you made my code of today seem archaic. ;(

    Quote Originally Posted by GeneralDisarray View Post
    -----Edit----
    Ok, i just posted my reply and now you've posted some code (which wasn't there a moment ago ) what exactly are you trying to do with that code?

    I edited it in to show the context. The sub is connected to a button. The user enters values in "Nummer" and "sträcka" and then clicks the button which calls the sub, and a time is entered at the address I am interested in!

  4. #4
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Referencing an address with column of cell that matches one cell value and row of anot

    ohhhh...

    try this one out. I'm going to assume the values are entered in cells labled Nummer and Sträcka (where the label is above the value).

    Please Login or Register  to view this content.

    SEE ATTACHMENT FOR DEMO
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-28-2011
    Location
    Sweden
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    14

    Re: Referencing an address with column of cell that matches one cell value and row of anot

    I have a hard time explaining it. I'm gonna start over.
    Last edited by groznij; 05-10-2012 at 08:20 PM.

  6. #6
    Registered User
    Join Date
    10-28-2011
    Location
    Sweden
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    14

    Re: How do I find the adress that shares the column of a certain cell and row of another?

    I am shamelessly bumping because my first explanation of the problem was terrible and would have led nowhere. I updated it and made it real clear! Any help would be great!

+ 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