+ Reply to Thread
Results 1 to 10 of 10

Adding a table into a table? Vlookup, Excel Table Function (With example)

  1. #1
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Adding a table into a table? Vlookup, Excel Table Function (With example)

    Hi all,

    Could you help me please?
    I am trying to create a sheet with subgroups, and in each subgroup there are several pieces, each piece has a number value assigned to it (in the example its their individual price) a quantity and there is a calculation of the total (price in this case) and finally a full subgroup total calculation. - See the example attached!

    What I'm trying to do, is (eventually) write a macro, that can add a piece into a chosen subgroup, for example, add "Dessert Forks" into SubGroup 2 or "Cutlery", but for this I somehow have to explain to excel, that there are subgroups, and in the subgroups there are pieces, so I thought I can do it with excel's table function and say there is a table within another table, but that doesn't seem to be possible. As "tables can't overlap". The most important thing about this, is for it to be dynamic, both the subgroups if we add a new subgroup, and the pieces in the subgroups. That's why I thought of the table function, but like I said, that doesn't do the trick.. Or I'm doing it wrong.. Or I'm over complicating.

    Any ideas how to explain this to excel? NOT in Macros, just for a VLOOKUP.

    I am only recently getting into excel in detail, so please explain your method if you manage to solve the riddle, as I would like to learn from it!

    Thank you!!
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    Not entirely clear what you're looking for, here - but why don't you simply store your data in a table, with Group as a column:

    Please Login or Register  to view this content.
    Now you can use pivot tables to (dynamically) report on the data.

    See attached file for worked example.
    Attached Files Attached Files
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    I need to display item quantities at all times, and if I do it with pivot tables, I get an unnecessary sum, which will be the sum of quantity... and for the original project with 600 rows and 20 groups, any unnecessary data will just cause confusion, so I'm afraid this wouldn't be the best solution, but thank you very much for your time and reply!

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    So remove subtotals...

    Or add to data model, and create a measure to only display Qty when Item has one value.

  5. #5
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    How do I do that, also instead of the subtotal is it possible to add another calculation?

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    Yes. Anything is possible.

    Your attached workbook is confusing. Try to think in terms of separating your INPUT and OUTPUT; mock up a workbook which displays your required output - create a manual sample, to make it clear what you're actually trying to achieve.

  7. #7
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    Okay, I'm posting the example again with an added column, which will need a function that tells us, based on each part, if there is an extra charge for packaging or not. Not perfectly life-like but lets say the company we are buying the pieces from, won't charge us for the packaging if its only a few items, but will charge us for it if most of them need bubble wrap.

    I really can't post my actual data as it is confidential, and it is VERY difficult to bring a "parallel" to it.

    So, on Sheet 1 my original layout for which I would like the VLOOKUP functions both to be with dynamic ranges, described for each coloured bit exactly what I would like from it, and on
    sheet 2 the pivot table with every column I need to display, and at the bottom, what sums I do not need from it, and for the new column, what I would like the rows to display.

    I'm really not sure if this made it any easier to understand, but here it is...

    INPUT OUTPUT - Wise: the individual parts are the inputs, there are several questions we need to answer about every part, each of them are user inputs (individual price, quantity needed, sum of price (this is a calculation but still an input!), fragile or not, what colour, used daily or not - for this example) and excel should output information about the subgroup (price to buy the parts in the necessary quantity, there is extra charge for packaging or not, parts are all the same colour or not - for this example) then the outputs from the SUBgroups will be the inputs for the group. (Lets say if the crockery is red we will have to buy red curtains for the restaurant)

    Sorry that its so hazy..
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    I google-d it a bit more what I am trying to do is I think to nest a table within another table. Using excels table function. Is it possible? If so how?

  9. #9
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    Quote Originally Posted by LIL2606 View Post
    I google-d it a bit more what I am trying to do is I think to nest a table within another table. Using excels table function. Is it possible? If so how?
    No, it's not possible to "nest" tables. But it is possible to create relationships between tables, using Power Pivot. Sounds like you need a Group table, and an Items table, with a group key for each item.

  10. #10
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Adding a table into a table? Vlookup, Excel Table Function (With example)

    Thank you! I will look into that now!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding/Merging new table under existing table
    By srequa in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-14-2018, 11:28 AM
  2. Crosstab table to pivot table to plain table exceeds Excel row limit
    By jjsilva in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-30-2017, 11:43 PM
  3. [SOLVED] Vlookup query - looking up from a horizontal table to deliver numbers to a vertical table
    By adam_d_john in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-21-2017, 09:43 PM
  4. [SOLVED] Adding a row in a table corrupts formula in a summary table (2nd table)
    By How How in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2015, 02:35 PM
  5. Expand a table by adding rows ( table feature 2007 and later)
    By Pepe Le Mokko in forum Excel General
    Replies: 3
    Last Post: 08-13-2013, 05:12 AM
  6. Adding formula to active table and for pivot table in macro
    By Jerseynjphillypa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2012, 08:12 AM
  7. Adding data to a table, from another table..reverse vlookup??
    By Speshul in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2012, 04:06 AM

Tags for this Thread

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