+ Reply to Thread
Results 1 to 15 of 15

Managing Three Variables

  1. #1
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Managing Three Variables

    I was just drawing up a spreadsheet (in iWork Numbers actually, though I have Excel '08) in preparation to buy a new car and ran into a problem that I have run into but have been unable to overcome in the past. How would I chart, and then graph, MPG, gas price, and distance driven such that I come out with a value that is equal to [(GasPrice/MPG)(DistanceDriven)]?

    Thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Managing Three Variables

    Attach a sample workbook

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Managing Three Variables

    If you have all that data in a range, then just do what you said, in a 4th column, and graph that column?

    A1=Gas Price
    B1=MPG
    C1=Distance Driven
    D1=value to plot =A2/B2*C2

    or am i missing something here? lol
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    Ahhh... you made me open Excel. I made a rough, incomplete recreation of what I had in Numbers... it took five minutes just to remember how to define absolute references and even then I couldn't get the auto-complete feature to work properly (if you can figure out how to auto-complete the MPG vs price chart please tell me). Anyways, if you click on 1500 or 1650 towards the bottom you'll see the final value I want. I don't know how to chart three variables, so obviously the data is not arranged correctly.

    Thanks

    p.s. you guys have the most obnoxious overcomplicated file upload tool I've ever seen
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    Quote Originally Posted by FDibbins View Post
    A1=Gas Price
    B1=MPG
    C1=Distance Driven
    D1=value to plot =A2/B2*C2
    Then I would have to write out every possible combination of MPG, Gas Price, and Distance Driven. With the 19 MPGs, 11 prices, and 6 distances I am considering, that would make for (19 x 11 x 6) = 1,254 rows of data. If you want to type it out, I'll give you the specifics... (you guys need that tongue out smiley)

    I'm also not sure a graph of that would work out well.

    Thanks for the reply though, I hadn't considered what you suggested and it might end up being the only way.

  6. #6
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    anybody???

  7. #7
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    Really no one? I didn't think this was that complicated...

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Managing Three Variables

    try this
    =INDEX($B$2:$B$20,MATCH(26,$A$2:$A$20,0),MATCH(3,$B$1:$L$1,0))*B24

  9. #9
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    Thanks, that solves my problem about quickly filling in the calculations. However my original problem still exists... I would appreciate any suggestions, thanks!

  10. #10
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    Still no love?

  11. #11
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    Baaaaaaaaahhhhhhhhhhgggggggggggoooooooooooddddddaaaaaaaaaaaammmmmmmmmmmnnnnnnnnnnnnnn.

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Managing Three Variables

    I'm not sure what you need that big table for, and no idea what you want to plot ...

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  13. #13
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    Ok, now how do I make a surface graph of that? I'm trying to set up the data in such a way that I can make a surface graph with MPG on the y-axis, distance driven on x-axis, and resultant cost on the (vertical) z-axis.

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Managing Three Variables

    Considering that you have MPG across the top, and gas price down the side, the body of the table would be cost for (one single) number of miles driven.

    For that, you can use the formula I gave you.
    Last edited by shg; 05-22-2012 at 08:11 PM.

  15. #15
    Registered User
    Join Date
    05-11-2012
    Location
    London, England
    MS-Off Ver
    Excel 2008
    Posts
    10

    Re: Managing Three Variables

    Ok, thanks for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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