+ Reply to Thread
Results 1 to 4 of 4

macro instead of vlookups

  1. #1
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    macro instead of vlookups

    hi everyone, i have tried the following using vlookups and sumif functions in my actual spreadsheet and it gets very slow due to the number of rows and columns.

    If you look at the MainReport worksheet there is a drop down on cell G5
    what i would like is for a macro to look at each worksheet from "Data" onwards and find each instance of Type 1 (or whatever is in cell G5 above) and return the values in rows D to O onto the Data sheet. i have tried to demonstrate this by putting a simple link in the cells on "Data" sheet.
    If anyone can help i would be really grateful, thanks
    Luce
    Attached Files Attached Files
    Last edited by tinkerbelle; 06-06-2010 at 07:39 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro instead of vlookups

    I'm not sure what formulas you were using, but this data layout and report layout can be done with formulas and it should be very robust. INDEX/MATCH/MATCH is perfect for this.

    I added some fake data on each of the report sheets to demonstrate.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    Re: macro instead of vlookups

    Thanks JB, the reason i thought a macro would be better was that this is only an example from a much larger spreadsheet, which might quickly become unwield or too big, however I like your INDEX and Match formulaes and i think they will be just perfect.
    thanks again.
    Luce

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro instead of vlookups

    I have used INDEX/MATCH on datasets 10mb+ and it is very robust! Since it isn't volatile, it's very good at not impacting sheet performance.

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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