Excel Queries to create a matrix?


New Member
May 2, 2019
Good Afternoon All,

I'm trying to put together a spreadsheet matrix with a "item name" on the Y axis and "Gift Name" on the X axis. Each gift comprises a number of items within one gift.

Both axis information is held within 2 separate worksheets within a source file workbook.

I have used the query tool to bring the data into the matrix spreadsheet which works well for the Y axis however I'm having trouble with the X axis, I can transverse the data but its not working the way i had hoped.

Both data tables will change over time so i was hoping that the query would allow it to grow and expand as necessary.

The basic formula i will use to populate the matrix will be something like:

VLOOKUP(ItemName,SourceWorkbook'GiftName!,2,False) (Column 2 represents number of units within gift)

I'm hoping to be able to write a generic formula which looks at the specific Gift Name and searches within a worksheet of the same name. (The worksheets are currently in a pricing file - which is the start point of any new gift)

Before I spend too long looking into something that may not be possible it would be great to hear the approaches more experienced excel users would take to achieve this.

Any help will be gratefully appreciated.

Kind Regards


Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics