Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Round to nearest 48 unit

Discussion in 'Information Technology' started by FA, Nov 9, 2005.

  1. FA

    FA
    Expand Collapse
    Guest

    I am doing a forecast of products.
    Each product have a package size. Some 24 units, some 48, etc.
    I want the rounding to indicate the nearest order size. For example: When
    the package size is 48 and if my forecast is 40 I want the number to be 48.
    If the forecast is 100, I want the number to be 96.
    In excel I would use Mround.
    How can I do this?

    Thank you very much!
    FA
     
  2. Loading...

    Similar Threads Forum Date
    UK Turban Kicked off His Head & Beaten to the Ground, Sikh Lawyer's Day in Court Begins Breaking News Jan 23, 2014
    General Teenager Admits She Punched Sikh Pensioner, 80, To The Ground Hard Talk Oct 19, 2013
    Movies Ashdoc's half complete movie review---Frozen ground Theatre, Movies & Cinema Sep 7, 2013
    SciTech B-School Startup: Turning Coffee Grounds Into Food Breaking News Sep 2, 2013
    Canada The Money Merry-Go-Round Breaking News Jul 10, 2013

  3. Ofer

    Ofer
    Expand Collapse
    Guest

    Is there a rule to the fixed amount of units you want to round to?
    The only thing I can think of is using the switch

    =Switch(FieldName < 36 , 24 , FieldName < 72 , 48 , FieldName < 96 , 96)


    "FA" wrote:

    > I am doing a forecast of products.
    > Each product have a package size. Some 24 units, some 48, etc.
    > I want the rounding to indicate the nearest order size. For example: When
    > the package size is 48 and if my forecast is 40 I want the number to be 48.
    > If the forecast is 100, I want the number to be 96.
    > In excel I would use Mround.
    > How can I do this?
    >
    > Thank you very much!
    > FA
     
  4. FA

    FA
    Expand Collapse
    Guest

    I have a table of package size by item to use for the rounding. Some
    products sell 48 units. Some 3,000.

    I think the swith will be impossible.

    Any other suggestions?

    Thanks,

    FA

    "Ofer" wrote:

    > Is there a rule to the fixed amount of units you want to round to?
    > The only thing I can think of is using the switch
    >
    > =Switch(FieldName < 36 , 24 , FieldName < 72 , 48 , FieldName < 96 , 96)
    >
    >
    > "FA" wrote:
    >
    > > I am doing a forecast of products.
    > > Each product have a package size. Some 24 units, some 48, etc.
    > > I want the rounding to indicate the nearest order size. For example: When
    > > the package size is 48 and if my forecast is 40 I want the number to be 48.
    > > If the forecast is 100, I want the number to be 96.
    > > In excel I would use Mround.
    > > How can I do this?
    > >
    > > Thank you very much!
    > > FA
     
  5. Thomas Winkler

    Thomas Winkler
    Expand Collapse
    Guest

    Hi,

    > I am doing a forecast of products.
    > Each product have a package size. Some 24 units, some 48, etc.
    > I want the rounding to indicate the nearest order size. For example: When
    > the package size is 48 and if my forecast is 40 I want the number to be

    48.
    > If the forecast is 100, I want the number to be 96.


    Round(forecast / 24; 0) 24

    HTH

    Thomas
     
  6. Daniel Lesenne

    Daniel Lesenne
    Expand Collapse
    Guest

    "Thomas Winkler" <nospam@mail.me> wrote in message
    news:egOd4RG5FHA.3628@TK2MSFTNGP10.phx.gbl...
    > Hi,
    >
    >> I am doing a forecast of products.
    >> Each product have a package size. Some 24 units, some 48, etc.
    >> I want the rounding to indicate the nearest order size. For example:
    >> When
    >> the package size is 48 and if my forecast is 40 I want the number to be

    > 48.
    >> If the forecast is 100, I want the number to be 96.

    >
    > Round(forecast / 24; 0) 24


    If you keep the value of items per package (eg UPP) in the products table
    you can replace the 24 with whatever figure fitting the particular product
    Round(forecast / UPP; 0)*UPP
     
  7. Thomas Winkler

    Thomas Winkler
    Expand Collapse
    Guest

    sorry, the expression should look like

    Round(forecast / 24; 0)*24
     
  8. Peter Danes

    Peter Danes
    Expand Collapse
    Guest

    You can add a reference to Excel (Tools / References in the VBA window) and
    all of Excel's functions will be available to you. That may come in handy if
    you have other mathematical issues in your DB.

    --
    Pete

    This e-mail address is fake to keep spammers and their auto-harvesters out
    of my hair. If you need to get in touch personally, I am 'pdanes' and I use
    Yahoo mail. But please use the newsgroups whenever possible, so that all may
    benefit from the exchange of ideas.


    "FA" <FA@discussions.microsoft.com> pí¹e v diskusním pøíspìvku
    news:66850654-0B7D-43CF-B9EC-6C381DEC716D@microsoft.com...
    > I am doing a forecast of products.
    > Each product have a package size. Some 24 units, some 48, etc.
    > I want the rounding to indicate the nearest order size. For example: When
    > the package size is 48 and if my forecast is 40 I want the number to be

    48.
    > If the forecast is 100, I want the number to be 96.
    > In excel I would use Mround.
    > How can I do this?
    >
    > Thank you very much!
    > FA
     

Share This Page