Excel Queries to create a matrix?

MrStrawb

New Member
Joined
May 2, 2019
Messages
6
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

Adam
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Watch MrExcel Video

Forum statistics

Threads
1,102,844
Messages
5,489,221
Members
407,681
Latest member
HoneyBadger914

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top