+ Reply to Thread
Results 1 to 3 of 3

Picking data using vba code

  1. #1
    Registered User
    Join Date
    07-24-2011
    Location
    singapore
    MS-Off Ver
    Excel 2007
    Posts
    6

    Picking data using vba code

    Hi guys,

    i have tried using mirror function but i can't seem to get what i want.

    Example: i need to have a set of fixed data on sheet1 and a blank sheet2

    sheet1 contains 2 column say column A1 with ''A'' B1 with ''1'', A2 with ''B'', B2 with ''2'' and so on.

    so when i go to sheet2 to key in any either A or B in column A, i will be able to pick the right number associated with the fixed data.

    Really hope i am able to find the right coding if possible.
    Thanks all in advance.
    Last edited by excel2891; 08-13-2011 at 01:46 AM.

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: need help - picking data

    Hi,

    You can use this code.

    You insert it in to the sheet2 code, not a module.

    Please Login or Register  to view this content.
    Steffen Thomsen

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

    Re: need help - picking data

    Hi'
    In B! cell of sheet2 enter the formula and drag it below as much required.
    =VLOOKUP(A1,Sheet1!$A$1:$B$4,2,FALSE)
    where $A$1:$B$4 represents the range used in sheet1.
    I hope it works.

+ 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