ANSWERS: 2
  • To continue my question: For example, on the master list I have the following labels under columns A,B,C: Category (A), SKU (B), and Item Description (C). Let's say that the first five cells under "Category" all read Electronics (rows 2-6), and the next five read Instruments (rows 7-11). The cells under SKU and Item Description all vary. Then on a second worksheet (slave), I want to be able to type in the name of a "category" into cell A1 and have all the corresponding information populate below (the same labels (category, SKU, and Item Description) will be on the slave sheet)). So for example, if I type in "Electronics" in cell A1 all of the information that was on the master list under the Electronics category (i.e. all the information from rows 2-6) will populate on the slave sheet. I have been able to use the INDEX function in conjunction with the MATCH function to have the first matched entry (i.e. row 2 from the master sheet) appear on the slave sheet, but I want it to pull ALL OF THE ROWS that contain the value "Electronics" in column A of the master sheet. I hope this makes sense, let me know if you need me to clarify, thanks.
  • This seems to work, but it's totally inelegant, I don't like it, and I'd try anything else (filters? pivot tables? some kind of summary table?) to avoid it. But what we try to do here at AB is "answer the Q", so in answer to your Q: With the data table built exactly how you have said, and answering exactly what you had asked, here is what I'd use for formulas on Sheet2 to find the data requested from Sheet1. Sheet1 column headers at Row 1 have been duplicated on Sheet2 at Row 1. Sheet2 cell A2 contains the 'Category' value that you want to summarize from Sheet1. Sheet2, cell B2 contains: =VLOOKUP( $A$2, Sheet1!$A$2:$C$30, COLUMNS( $A$2:B2), FALSE) Copy the same formula to Sheet2, cell C2. Sheet2, cell B3 contains: =VLOOKUP( $A$2, OFFSET( Sheet1!$A$2:$C$30, MATCH( $A$2, Sheet1!$A$2:$A$30, FALSE) + ROWS( $A$2:A2) - 1, 0), COLUMNS( $A$2:B2), FALSE) Copy that formula to Sheet2, cell C3 and down columns B and C as far as you want. (There's no error trap built into this formula to avoid the inevitable #NA error you'll get when there's "no more match", but that could be added to the formulas if you wanted them to be even uglier than they are.) These formulas will only work properly when the source data (Sheet1) is sorted so that all "category" items are grouped together. I hate it. I can't imagine using it, ever. But it answers the Q.

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy