Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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
    GURU NANAK’S VISIT TO OTTOMAN EMPIRE-BACKGROUND New to Sikhism Jan 19, 2017
    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

  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
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page