+ Reply to Thread
Results 1 to 10 of 10

Formula for decreasing value.

  1. #1
    Registered User
    Join Date
    01-21-2013
    Location
    any
    MS-Off Ver
    Excel 2007
    Posts
    4

    Formula for decreasing value.

    Here is my problem. I want to know how many boards I can get out of a piece of wood.

    I have a length that is 192 inches.

    What I need to do is cut single boards that start with board 1 at 8 inches wide and each board after descreases by .5 inch.
    so I would have

    board 1 8" wide
    board 2 7.5" wide
    board 3 7" wide

    and so on. But I would like to know how many I can get. This way I can change the .5 inch width to something else.

    Thanks

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula for decreasing value.

    do you mean it starts at 8" LONG and the length decreases by 1/2 inch ?
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Registered User
    Join Date
    01-21-2013
    Location
    any
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula for decreasing value.

    Yes..........

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula for decreasing value.

    Sorry for taking so long to get back

    Could not figure out a single formula solution, but maybe this will work for you :omnifold.sol1.xlsx

    Hope this helps

  5. #5
    Registered User
    Join Date
    01-21-2013
    Location
    any
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula for decreasing value.

    Thats about what I came up with. That works. I just wanted one like loan payment formula. Another problem I am running into is

    If the board is 100 feet in length and I start with an 8" piece and take off a 1/2" on each cut I will not use the whole length of the board. What I would like is where I can cut so many 8" inch pieces then start cutting 7.5" pieces and so on.

    so maybe there will be 5 of each of the different cuts.

    Thanks so much so far.

  6. #6
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula for decreasing value.

    Sorry---was adding the saw curf, not subtracting..

    Revised : omnifold.sol2.xlsx

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula for decreasing value.

    Okay, Try this UDF solution, will work for both scenarios
    Please Login or Register  to view this content.
    to use, allow Macros,open VBA editor (Alt-F11), Insert Module, Copy & paste above into the module,save close editor

    Parameters are
    StrtLeng, FrstCutLeng, CutIncr, Optional NumCutsPer, Optional IncldCurf, Optional CurfSz, Optional ReturnOpt
    StrtLeng - Starting length of your board, in decimal inches (ie 100 1/2 inches = 100.5)
    FrstCutLeng - Length of your first cut(s) in decimal inches
    CutIncr - length to decrease cut length by in decimal inches
    NumCutsPer (Optional) - how many cuts to make at each Length (defaults to 1)
    IncldCurf (Optional) - 1 = include saw curf,0 = don't include saw curf (defaults to 0)
    CurfSz (Optional) - size of the saw blade curf in decimal inches (defaults to 0.125 (1/8"))
    ReturnOptions (optional) 0- Total number of cuts made, 1- length of board left (if any) after as many cuts can be made using first 4 parameters, 2- the length of the last cut, in decimal inches, 3- a brief text summary of options 1,2&3 (defaults to 0)

    See attachment for examples

    Hope this helps
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-21-2013
    Location
    any
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Formula for decreasing value.

    Thanks you so much for the time spent. The unkown is the cuts per length. That is what I really want.

    So if the length is 192 and cuts per length = 1 it will give me 50cuts.
    2 errors
    1 is if I double the 192 and make it 386 and keep the cuts per length =1 it still returns 50 cuts
    2nd error is if i take the cuts per length = 2.5 the cuts will remain 8 inches

  9. #9
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula for decreasing value.

    1) if you run out of decreases, doubling the starting board length wont increase the number of cuts, it will just increase the amount of board you have left at the end of the sequence of cuts
    2) as for 2.5 cuts per lenth...how would you accomplish this? I have never been able to do it with my saw ! the number of cuts is supposed to be an integer, ( the display using the helper columns assumed an integer # of cuts, so you keep seeing 8"(I left it in for error checking the UDF)), however, this did point out a flaw in the logic of the UDF as well --- I did not check for that !!!
    Please Login or Register  to view this content.
    new code forces the number of cuts to an integr value, and I updated the Formula version as well to display interim results properly
    Same Parameters as before

    Hope this helps

  10. #10
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Formula for decreasing value.

    Forgot the example , then I couldn't get back on!
    Anyways, here''s the example

    Remmeber, the UDF is displaying its results in Column I, the results returned in columns D,E and F are all from Excel Functions alone, just to visualize the What the UDF is doing
    Attached Files Attached Files
    Last edited by dredwolf; 01-22-2013 at 03:19 PM.

+ 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