+ Reply to Thread
Results 1 to 8 of 8

Fuel Consumption Calc

  1. #1
    Registered User
    Join Date
    04-24-2009
    Location
    BC, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Fuel Consumption Calc

    SOLVED!!!!!!!!!!!!!!!!!!!!!!!!!!




    thx for putting in the effort shg
    It's appreciated!




    I have a spreadsheet where the goal is to calculate the amount of fuel and fuel bottles to take hiking on trips with me

    H2= The amount of fuel in oz.'s I am taking on my trip
    I2= A calculation of how many 11oz. bottles to take
    J2= A calculation of how many 22oz. bottles to take
    K2= A calculation of how many 33 oz. bottles to take

    Right now i have:
    I2= =IF(H2<11.1,CEILING((H2/I4),1),0)
    J2= =IF(H2<22.1,CEILING((H2/J4),1),0)
    K2= =IF(H2>22,CEILING((H2/K4),1),0)
    I4= 11 (11oz. fuel bottle)
    J4= 22 (22oz. fuel bottle)
    K4= 33 (33oz. fuel bottle)

    The problem, besides the fact that I'm unure how to only count J2 if it's between the two other bottle sizes, is that I want it to cycle between the formuals to pick the smallest bottles possible not just isolating the one bottle size because the total ounces falls into my formula
    EXAMPLE:
    H2=37
    Therefore the formula in K2 takes full control and sets its value to '2'

    What I want it to do is
    EXAMPLE#1:
    if H2(the amount of fuel i'm taking) is 37oz. it'll show as following
    I2=1 (4oz. within this bottle)
    J2=0 (doesn't count because it's not the logical size to take)
    K2=1 (33oz. bottle full)

    EXAMPLE#2:
    if H2(the amount i'm taking) is 48oz. it'll show as following
    I2=0 (doesn't count because it's not the logical size to take)
    J2=1 (15oz. within this bottle)
    K2=1 (33oz. bottle full)
    Last edited by colinface; 04-26-2009 at 04:38 AM.

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

    Re: Count Values Between...

    Welcome to the forum.

    Is the problem you're describing equivalent to making change with coins of various values?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-24-2009
    Location
    BC, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Count Values Between...

    Thx for the welcome

    I guess in a way it is.
    I just need it to select the logical bottles to use for the amount of fuel inputed.
    So that i'm carrying the least amount of bottles and the smallest bottles possible.
    For example:
    I don't want to be carrying 5 (33oz) bottles when I could be carrying 4 (33oz) bottles and 1 (11oz) bottle

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

    Re: Count Values Between...

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-24-2009
    Location
    BC, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Cool Re: Count Values Between...

    I'm not sure if that'd work for my spreadsheet
    looks like it needs multiple cell values instead of all from one cell

    I've attatched the section of the spreadsheet relevant to this
    I worked on it for hours last night and got close
    but it still needs a few modifications to a formula or two
    I'm sure i'm just doing something really simple wrong

    Although I gather there is a much simpler way to do it then I've tried


    OOO SOLVED IT MYSELF

    Thnx for trying to help! I'm sure i'll need a lot more to come
    Last edited by colinface; 04-25-2009 at 03:50 PM.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,033

    Re: Count Values Between...

    don't forget to make your thread [solved]
    Never use Merged Cells in Excel

  7. #7
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: Count Values Between...

    How about posting details of how you solved your problem
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  8. #8
    Registered User
    Join Date
    04-24-2009
    Location
    BC, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Angry Re: Count Values Between...

    Couldn't figure out how to make the thread solved =[

    As for showing how I did it
    It's a mess and only works with my entire spreadsheet linked to it now
    it was just a lot of messing around with >'s and <'s =]
    Last edited by colinface; 04-27-2009 at 02:53 AM.

+ 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