+ Reply to Thread
Results 1 to 16 of 16

How to do a Table with 3 variable

  1. #1
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    How to do a Table with 3 variable

    I am trying to do a table that has 3 variables.

    So in the enclosed example the ring size can have the various depths, but it can also have upto 5 pipe sizes per ring per depth. which all have different prices associated with them (the main table)

    I am unsure how the best way to set this out would be, if anyone can advise me please?
    Attached Files Attached Files
    Last edited by gjjh25; 04-12-2021 at 03:01 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: How to do a Table with 3 variable

    I don't see where you have mocked up a few examples and the lookup table seems to be empty. There's not enough to go on here - sorry. Add some more details.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: How to do a Table with 3 variable

    I have posted a new table with values in.

    But that is the problem, I dont know how to set the table out, when say a 1200 dia at 1.75 - 2m deep can have different prices at .15,.225,.300,.450 for the pipe size.

    Its having that extra variable the pipe size that I dont know how to set the table out. If that makes sense?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: How to do a Table with 3 variable

    Please give us at least ONE example of a calculation that you'd want to make using the table and what the result of that calculation should be. Then we can let you know whether the table will work and how to use it. Without an example, I won't go any further - sorry. Guessing games lead to a lot of wasted time and energy.

  5. #5
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: How to do a Table with 3 variable

    Sorry, I dont think I have been very clear, it is not a result calculation that i am looking for.

    I am looking for advice on how to create the table given that it has three variable columns. eg not just size down the side and depth across the top, I need help on how to incorporate the pipe size within a table too. if this still is no good as a description, please delete and I will have to have a re think.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: How to do a Table with 3 variable

    OK - so what's the purpose of the table? Unless we know HOW you are going to use it, there's nothing we acn do to advise on how it should be put together.

  7. #7
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: How to do a Table with 3 variable

    I will use the initial calculation is to get the dia from column A and the Depth from row 49. But then it needs a pipe size too. This bit is not set up correct as a table as I don't know how to incorporate the different sizes related to the different dia. So somewhere i need to fit within the table say, 1200 dia 1.5 - 1.75 deep, but it would also depend on the pipe dia too which could be either .150, .225, .300, .450.

    So for each dia in the down column, it would have one of the depth ranges in row 49, but it would also have a pipe dia for the sizes listed too. I just cant get how to have a cell that would reference this? So I cant show a proper example, because I dont know where to put the pipe di references, within the table.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: How to do a Table with 3 variable

    OK - I am getting closer to knowing what you want!

    Ultimately, if a customer came in and wanted to buy some piping, what would you need to ask him? In other words, what details would you need to be able to work out the cost based on the three (?) aspects you've mentioned? When we know that, we'll be able to tell you how to lay out the table.

    Does this make any sense? You are clearly trying to create a lookup table that will ultimately be used to automate a price calculation.

  9. #9
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: How to do a Table with 3 variable

    I would ask them what size dia they require from column A, then I would ask what depth range it would fall into in Row 49, finally I would ask them what was the pipe size going into this.

    Yes it is a look up table but it is that final pipe size lookup I dont know how to put into the table.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: How to do a Table with 3 variable

    Right - what you need to ask yourself is how of those three things would affect the pricing. Explain in words the calculations that you would have to do for one scenario (you can choose the values). Once we know exactly how the three things relate, we can help you structure the best lookup layout.

  11. #11
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: How to do a Table with 3 variable

    Thanks for you patience.

    I have uploaded another version which i further breakdown which I think works as a look up table I have only done the first 2 depths but it would carry on for all depths.

    Just looks a bit unwieldly.

    Is this understandable and the best way to create this table?

  12. #12
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: How to do a Table with 3 variable

    It's still not clear to me how you intend to use this 3D lookup table. I'm fairly certain that depth is a continuous variable (it can be any real, positive number up to at least 8.25 and maybe beyond). The other two variables, I'm not sure how they are used.

    It seems to me that a spreadsheet -- as a 2D grid -- works well with 1D and 2D data, but 3D (and higher D) data becomes more problematic. Just about any spreadsheet solution that come to mind involve "reducing" the number of dimensions in some way. If I assume that ring diameter and pipe diameter are discrete values (the values listed in your spreadsheet are the only values that these can be and they cannot be values in between the tabulated values), then I think I would lean towards something that combines ring and pipe diameter into one lookup value, then use a simple 2D lookup table like you currently have. Since ring diameter appears to be "large" integers (900 to 300 spaced at 150/300 unit intervals) and pipe diameter tends to be "small" fractions/decimals (ranging from 0.15 to 1.35 -- except for the odd 675 value between 0.6 and 0.75??), here's how I might do it:

    1) Combine ring diameter and pipe diameter by summing. Again, I'm assuming that these are discrete numbers (ring diameter cannot be 901 or 1235 and that pipe diameter cannot be 0.2 or 0.5). I will also assume that a pipe diameter currently listed as 675 could be just as easily represented as 0.675. This gives me values along the left side of the lookup table of 900.15, 900.225, 900.3, 900.45, 900.525, 900.6, 900.675,...,1050.15,....
    2) Again, I'm assuming depth range is a continuous variable (can assume any positive real value). Across the top of the table, I enter the "boundaries", 0, 1, 1.25, 1.5, 1.75, 2,...
    3) Now, when I am given pipe diameter, ring diameter, and depth, I can add the pipe and ring diameter and use an exact match lookup MATCH() function to find the correct row number. An approximate match lookup MATCH() function based on depth can find the column number. Then an INDEX() function can easily extract the result from the body of the 2D lookup table.

    I've had to guess at a few different aspects of your problem, so I don't know if that is useful or not. If nothing else, maybe it will give you a framework to better describe how you intend to use these lookup tables and values in real life so we can address the full problem.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  13. #13
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: How to do a Table with 3 variable

    Thanks for the advice, I will have a try of it.

    Regards the depths, they need to fall between the ranges so between 1.5-1.75, 1.75-2.00 etc

  14. #14
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: How to do a Table with 3 variable

    Based on post #9 and the bottom file in post #1 the following might be what you want.
    Cells C21:C23 would display Ring Dia, Depth and Pipe Dia respectively.
    Note that this might be accomplished using data validation drop downs, however I wanted to make sure I understand the request before attempting.
    Cell F21 displays the cost using: =INDEX(C9:AW18,MATCH(C21,B9:B18,0),AGGREGATE(15,6,(COLUMN(C4:AW4)-COLUMN(B4))/(C4:AW4=C23)/(C7:AW7<=C22)/(C8:AW8>=C22),1))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  15. #15
    Forum Contributor
    Join Date
    09-06-2011
    Location
    manchester england
    MS-Off Ver
    Office 365
    Posts
    283

    Re: How to do a Table with 3 variable

    Thank you, Sorry not been on here for a while.

  16. #16
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: How to do a Table with 3 variable

    Here is the file with data validation drop downs in C21:C23.
    The lists for Depth and Pipe Dia. are in columns XFC:XFD
    The source for those two drop downs is similar to: =OFFSET($XFD$2,0,0,SUMPRODUCT(--($XFD$2:$XFD$35<>"")))
    Let us know if you have any questions.
    Attached Files Attached Files

+ 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. Excel table filter by date variable through data picker date variable
    By SamanH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2018, 01:09 PM
  2. Select column from table using variable table name -- VBA
    By jscott15 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-03-2016, 06:28 AM
  3. Two variable look up from a table
    By krlss26 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-01-2014, 10:12 PM
  4. Replies: 1
    Last Post: 10-27-2012, 02:54 AM
  5. Replies: 3
    Last Post: 07-05-2012, 01:49 AM
  6. Variable File Reference and Variable Table Array in VBA VLOOKUP
    By Gingeiko in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2011, 11:08 PM
  7. How can i Append to Table using table Variable name
    By champs in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-18-2009, 04:34 AM

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