+ Reply to Thread
Results 1 to 1 of 1

vlookup in a VBA code?

  1. #1
    Forum Contributor
    Join Date
    12-27-2007
    Posts
    106

    vlookup in a VBA code?

    Hi

    I've got the following code:

    Please Login or Register  to view this content.
    Plus the follwing vlookup function:

    PHP Code: 
    =VLOOKUP(G2,'REF PAGE'!$A$1:$L$997,2,FALSE
    What this does is to:
    1. enter barcode into col a
    2. Automatically enters todays date in col b
    3. pops up inpt box and asks for quantity, which is then put into col c
    4. barcode is automatically entered in col G
    5. total of the quatities for the barcode are automatically calculated in col H
    6. Col I: looks up barcode from col G, from another worksheet called "ref page", and inserts the value from the second column (i.e. col B) of the "ref page" worksheet

    The trouble is that i have to copy the vlookup formula all the way to the end of the column for this to work - so i was hoping that if using VBA, perhaps the vlookup function could be incorporated into the VBA - thus excel will automatically do the vlookup when Col G is populated - is thsi possible?

    Also, is it possible for the data located in Col G and H to be automatically copied to a completely new sheet?
    Last edited by tony0710; 03-03-2009 at 04:02 PM.

+ 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