+ Reply to Thread
Results 1 to 2 of 2

Copying Macro w/ different sheets

  1. #1
    Registered User
    Join Date
    03-21-2006
    Posts
    14

    Copying Macro w/ different sheets

    I need help with a macro.

    I have 5 columns and 75 rows that need a Vlookup function in them. Each column will be using a different sheet for the Vlookup and each row will need a differnent column # to retrieve the data. Is there a macro I can set up to input this data??

    Thanks,

    Lisel

  2. #2
    Max
    Guest

    Re: Copying Macro w/ different sheets

    Perhaps a formulas approach using INDIRECT to grab
    the table_array from the reference sheet would also be feasible ?

    Sample construct is available at:
    http://www.savefile.com/files/3504820
    Vlookup different sheets n different col nums

    Assume 3 reference sheets: X, Y, Z
    where cols A to G contain lookup data
    with col A = lookup values
    data from row1 down

    In another sheet: Summ,

    Ref sheetnames are listed across in B1:C1, eg: X, Y, Z
    (vlookup) Col #'s are listed in B2:C2 across, eg: 2, 7, 3
    Lookup values are in A3 down

    To retrieve the necessary from each reference sheet
    for the lookup values in col A,

    we could put in B3:
    =VLOOKUP($A3,INDIRECT("'"&B$1&"'!A:G"),B$2,0)
    and copy B3 across to D3, fill down to populate

    Adapt/extend to suit ..
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---
    "liseladele" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I need help with a macro.
    >
    > I have 5 columns and 75 rows that need a Vlookup function in them.
    > Each column will be using a different sheet for the Vlookup and each
    > row will need a differnent column # to retrieve the data. Is there a
    > macro I can set up to input this data??
    >
    > Thanks,
    >
    > Lisel
    >
    >
    > --
    > liseladele
    > ------------------------------------------------------------------------
    > liseladele's Profile:

    http://www.excelforum.com/member.php...o&userid=32688
    > View this thread: http://www.excelforum.com/showthread...hreadid=525069
    >




+ 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