+ Reply to Thread
Results 1 to 7 of 7

Userform to return vlookup then reference vlookup text

  1. #1
    Forum Contributor
    Join Date
    08-08-2015
    Location
    North Carolina USA
    MS-Off Ver
    MS Office 2016
    Posts
    368

    Userform to return vlookup then reference vlookup text

    Hi - I am trying to input a file number (example = 11-F01234) into a userform and then have corresponding data populate in the other fields of the userform. My userform is not throwing any errors but it also is not returning the values. Can anyone see what I am doing wrong with the below code?

    Reg 1 = the textbox where I am putting in the file number. Reg 2 = the lookup values.... on a sidenote - I am then going to use the return values to populate fields on a web page so will need to be able to reference them after

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform to return vlookup then reference vlookup text

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    08-08-2015
    Location
    North Carolina USA
    MS-Off Ver
    MS Office 2016
    Posts
    368

    Re: Userform to return vlookup then reference vlookup text

    Here is an example.. I had to remove a lot of things so it may show an error but if you can get this to work then I will be able to get mine to work. The data wont start untilrow 24 like it does here... the headers will be on row 23...
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform to return vlookup then reference vlookup text

    Eh, aren't the file #s in column A, not column C?

    Try this.
    Please Login or Register  to view this content.
    Note, I've kind of had to guess which columns to take the data from as the VLookup range in the original code only appeared to consist of one column so it wasn't clear where the data is mean to come from.

    PS There might also be some formatting issues re the dates/times in the data.

  5. #5
    Forum Contributor
    Join Date
    08-08-2015
    Location
    North Carolina USA
    MS-Off Ver
    MS Office 2016
    Posts
    368

    Re: Userform to return vlookup then reference vlookup text

    Yes - sorry about that... the file numbers are in column A on this example but in C in the actual workbook. let me give this a try now, thank you!

  6. #6
    Forum Contributor
    Join Date
    08-08-2015
    Location
    North Carolina USA
    MS-Off Ver
    MS Office 2016
    Posts
    368

    Re: Userform to return vlookup then reference vlookup text

    Thank you! This is close enough to what I need (since I did not explain very well and could not provide exact workbook) - I can figure it out from here - one last question - if I need to format a cell as a date, or a time, how do I edit that specific reg# to do so?

  7. #7
    Forum Contributor
    Join Date
    08-08-2015
    Location
    North Carolina USA
    MS-Off Ver
    MS Office 2016
    Posts
    368

    Re: Userform to return vlookup then reference vlookup text

    Also, if I wanted to reference a particular one of these reg's when filling out a form online - how should I reference it? Below is an example of how I have used one in the past, with a specific column/row

    IE.document.all("Document_Type").Value = ThisWorkbook.Sheets("Data").Range("e2")
    Do Until IE.readyState = 4

+ 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] Vlookup value return occurrence corresponding to the reference
    By Vandini.S in forum Excel General
    Replies: 7
    Last Post: 07-04-2015, 05:30 AM
  2. [SOLVED] vlookup with one reference, and return with multiple values
    By nth34 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2015, 01:40 AM
  3. Vlookup same reference and return value if different
    By MartinjLane in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 06-21-2013, 04:28 AM
  4. VLookup and return the cell reference.
    By Fabius in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-17-2011, 03:18 PM
  5. Text on userform conditionally appearing if vlookup finds reference
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2010, 02:27 PM
  6. Excel 2007 : Can vlookup ever return a reference?
    By Marinoniblue in forum Excel General
    Replies: 2
    Last Post: 12-07-2009, 11:31 PM
  7. VBA: vlookup and return cell reference
    By sport_logo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2008, 09:20 AM

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