+ Reply to Thread
Results 1 to 7 of 7

Build Summary (top10) from Raw Data - Sort and Filter

  1. #1
    Forum Contributor
    Join Date
    01-09-2011
    Location
    Nomans, Land
    MS-Off Ver
    Excel 2007
    Posts
    103

    Build Summary (top10) from Raw Data - Sort and Filter

    Hello,

    I have a worksheet that is updated daily, containing:

    Price Changes/Variation (%)
    Financial Volume
    Quantity Traded
    etc..

    Everyday I have to post top financial gainers and losers by Price (%), Financial Vol, and Quantity, listed in a different worksheet.

    How can I do this using vba?

    I`ve attached a workbook example, with only raw data and the summary sheet.

    Thanks in advance for any help!
    Attached Files Attached Files
    Last edited by exc4libur; 03-09-2011 at 10:31 PM.

  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: Build Summary (top10) from Raw Data - Sort and Filter

    In B5 then copied down:
    =INDEX(Sheet2!B:B,MATCH(LARGE(Sheet2!D:D,ROW(A1)),Sheet2!D:D, 0))

    In D5 then copied down:
    =INDEX(Sheet2!B:B,MATCH(SMALL(Sheet2!D:D,ROW(A1)),Sheet2!D:D, 0))

    In B11 then copied down:
    =INDEX(Sheet2!B:B,MATCH(LARGE(Sheet2!E:E,ROW(A1)),Sheet2!E:E,0))

    ...etc.
    _________________
    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
    01-09-2011
    Location
    Nomans, Land
    MS-Off Ver
    Excel 2007
    Posts
    103

    Re: Build Summary (top10) from Raw Data - Sort and Filter

    It works fine, but I need it in VBA
    Last edited by exc4libur; 03-09-2011 at 08:58 PM.

  4. #4
    Forum Contributor
    Join Date
    01-09-2011
    Location
    Nomans, Land
    MS-Off Ver
    Excel 2007
    Posts
    103

    Re: Build Summary (top10) from Raw Data - Sort and Filter

    Quote Originally Posted by exc4libur View Post
    Not working J.
    Also, can I type this formula to my vba? Like a function - Create new wks then summarize top 10 columns from Raw Data Worksheet.
    Yeyyy, it worked! I had to substitute "," for ";".

    Anyhow, could you still help me, I would like to type this in a vba module!

    For example: I want a rank containing top gainers/losers listing company name and what was the price change or quantity traded.. Is there somehow?

    thks

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

    Re: Build Summary (top10) from Raw Data - Sort and Filter

    If it's the exact sheet/layout you posted, just turn on the recorder and let it record you putting in the formulas. Why do you need VBA for something as simple as you've shown?

  6. #6
    Forum Contributor
    Join Date
    01-09-2011
    Location
    Nomans, Land
    MS-Off Ver
    Excel 2007
    Posts
    103

    Re: Build Summary (top10) from Raw Data - Sort and Filter

    Quote Originally Posted by JBeaucaire View Post
    If it's the exact sheet/layout you posted, just turn on the recorder and let it record you putting in the formulas. Why do you need VBA for something as simple as you've shown?
    I wanted to make everything automated.. But nevermind, its sheer human curiosity!

    Hehehe, thanks, youve helped me enough!

    Best rgds

  7. #7
    Forum Contributor
    Join Date
    01-09-2011
    Location
    Nomans, Land
    MS-Off Ver
    Excel 2007
    Posts
    103

    [SOLVED] Build Summary (top10) from Raw Data - Sort and Filter

    Thnks for all the help!

    This formula below ranks data by
    top gainers
    =INDEX(Sheet2!B:B,MATCH(LARGE(Sheet2!E:E,ROW(A1)),Sheet2!E:E,0))
    top losers
    =INDEX(Sheet2!B:B,MATCH(SMALL(Sheet2!D:D,ROW(A1)),Sheet2!D:D, 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