+ Reply to Thread
Results 1 to 10 of 10

Offset and find functions

  1. #1
    Registered User
    Join Date
    11-29-2011
    Location
    Japan
    MS-Off Ver
    Excel 2010
    Posts
    6

    Offset and find functions

    Morning all,

    Have been browsing this site for a while, trying to learn as much as I can about OFFSET and FIND but have come unstuck.

    I would like to be able to use a userform to find a student number, and then add the student score to the next blank cell, from COT 1 onwards.

    I have attached a dummy worksheet with what I would like to do, but it is proving a bit of a headache with my basic knowledge of VBA.

    Many thanks in advance. :D
    Attached Files Attached Files
    Last edited by maninjapan; 12-01-2011 at 01:46 AM. Reason: changed title

  2. #2
    Registered User
    Join Date
    11-29-2011
    Location
    Japan
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Offset and find functions

    Any thoughts or pointers please?

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Offset and find functions

    Your current code actually copies the data in the Student name column instead of the scores. My question to you is, should the scores be added in the COT 1 column alone or should it be added to the other columns as well? Do you mean to say, that if the user is entering a score for a student, if COT 1 already has a value, it should move to COT 2?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    11-29-2011
    Location
    Japan
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Offset and find functions

    Quote Originally Posted by arlu1201 View Post
    Your current code actually copies the data in the Student name column instead of the scores. My question to you is, should the scores be added in the COT 1 column alone or should it be added to the other columns as well? Do you mean to say, that if the user is entering a score for a student, if COT 1 already has a value, it should move to COT 2?

    Thank you for your reply.

    What I would like the code to do is this:

    1) Teacher enters the student number
    2) Teacher enters the students score
    3) Using the find/vlookup, to find the students number, and add the score to the next free cell, ie if COT 1 has a value, then it should move to COT 2.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Offset and find functions

    Pl see the attached workbook.I have edited your userform and code.
    Clarifications welcome.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 11-30-2011 at 05:32 AM.

  6. #6
    Registered User
    Join Date
    11-29-2011
    Location
    Japan
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Offset and find functions

    Dropdown menu! sugoi!

    arigaou gozaimasu!

  7. #7
    Registered User
    Join Date
    11-29-2011
    Location
    Japan
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Offset and find functions

    I try to use on Excel for Mac 2011 but I get "run time error '380'.

    Is this because Mac?

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Offset and find functions

    Sorry. I don't know about MAC. It works ok in excel 2007 version.I have changed code slightly.Pl see once again.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 12-01-2011 at 01:21 AM.

  9. #9
    Registered User
    Join Date
    11-29-2011
    Location
    Japan
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Offset and find functions

    I had to use the list function

    Please Login or Register  to view this content.

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Offset and find functions

    Pl change code like this and try.
    code
    StudentNumber.List = Worksheets("M1").Range("A1:A" & WorksheetFunction.CountA(Range("A:A"))).Value

+ 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