+ Reply to Thread
Results 1 to 4 of 4

Extract multiple rows from multiple worksheets with Index formula

  1. #1
    Registered User
    Join Date
    05-27-2011
    Location
    Detroit
    MS-Off Ver
    Excel 2003
    Posts
    2

    Extract multiple rows from multiple worksheets with Index formula

    Hello all,
    I could really use your help in figuring out a formula to pull each Color entry (see sample below, also attached) from 14+ worksheets into one spreadsheet. I don't think Vlookup will work in this situation so I tried using the Index formula but I think I am doing something wrong because it didn't work. I saw an answer posted by "NBVC" to a very similar question in the forum. This is the formula that worked for the other person...

    [If(ROWS($A$1:$A1)>COUNTIF(Main!$C$2:$C$28,"Mike"),””,INDEX(Main!$B$2:$B$28,SMALL(IF(Main!$C$2:$C$28="Mike",ROW(Main!$C$2:$C$28)-ROW(Main!$C$2)+1),ROWS($A$1:$A1))))]

    I couldn't get it to work in my worksheet (after changing the worksheet and cell references). If my workbook name is "TestBook” and worksheets are called "Lamp, Book, Fruit, and Sky" then how would I change this formula to work for me assuming I can use this formula for my question. Any help would be appreciated.

    Sample data table:
    A B C D
    1 Color Code Quantity Price
    2 Red 1 1 $5.00
    3 Green 2 0 $-
    4 Purple 3 1 $15.00
    5 Red 1 1 $5.00
    6 Blue 4 5 $30.00
    7 Red 1 1 $5.00
    8 Blue 4 5 $30.00
    9 Black 5 6 $60.00
    10 Green 2 0 $-
    11 Violet 6 10 $100.00
    12 Blue 4 5 $30.00
    13 Pink 7 0 $-
    14 Orange 8 12 $90.00

    Please let me know if I can provide any further information that may be helpful.

    Many thanks,
    RedApple
    Attached Files Attached Files
    Last edited by RedApple; 05-27-2011 at 04:50 PM. Reason: Provide better layout of the sample data via attachment

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract multiple rows from multiple worksheets with Index formula

    The question itself is very confusing.. the sheetnames you mention are not even in your sample workbook. You should show what you are expecting as a result and the logic for it.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-27-2011
    Location
    Detroit
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Extract multiple rows from multiple worksheets with Index formula

    Hi,

    Sorry for the confusion. Let me start over...
    I have 15 worksheets in an excel file and each worksheet is 10 columns wide. Let's say the key column heading is "Color". Then, each color is repeated multiple times in each worksheet with new info in rest of the columns. I need to pull each color entry (the whole row) from each worksheet into a new worksheet. How can I do that?

    I hope I explained it better this time.

    Thank you.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract multiple rows from multiple worksheets with Index formula

    Probably going to require some VBA... which is not my strength... but I still don't think you have provided enough... Like how do we determine which rows go to the summary? Is it every row of every sheet, is it only one specific colour?

+ 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