+ Reply to Thread
Results 1 to 4 of 4

Userform Vlookup Increment Cell Value

  1. #1
    Registered User
    Join Date
    04-01-2013
    Location
    Perth, Western Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Userform Vlookup Increment Cell Value

    Hi,

    I'm new to the forum!

    I have a list of transport companies in column E with their consignment/reference numbers in column G.

    I have a userform with a combobox, a textbox and a command button.

    With the command button, I would like to increment the consignment number to the relative transport company (i.e. combobox.value).

    I found how to increment the value of a cell - Range("A1").Value = Range("A1").Value + 1

    But how do you 'vlookup' and increment the value of that cell? Any help would be much appreciated

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Userform Vlookup Increment Cell Value

    You might want to consider using combobox1.listindex instead of Vlookup....... Listindex returns the row number of the selected item and is easily related to a worksheet row and therefore cell..
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    04-01-2013
    Location
    Perth, Western Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Userform Vlookup Increment Cell Value

    Sweet, thanks for that! I had to +2 for some reason but I got it working anyways Cheers!

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Userform Vlookup Increment Cell Value

    The Listindex property starts at 0

+ 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