+ Reply to Thread
Results 1 to 7 of 7

MROUND Formula for Ordering System

  1. #1
    Registered User
    Join Date
    10-21-2022
    Location
    Indiana, America
    MS-Off Ver
    Microsoft 365
    Posts
    7

    Question MROUND Formula for Ordering System

    Good morning everyone,

    I have ran into a bit of a conundrum and was hoping that you guys and gals could help me out.

    I am using the following formula on an excel sheet I use for an ordering system at my workplace:

    =IF((G2360-E2360)>0,MROUND((G2360-E2360),25),IF((G2360-E2360)<0,0)) (Simply using the IF function to work around the fact that MROUND doesn't like negative results)

    In this example, if G = 900 and E = 899 I would like the result to become 25, because I need to order 25 pcs of this part once I get below my order point.

    However, what will happen is if E =< 888 the result is 0, and if E => 887 the result is 25. (Basically, a difference of 12.5 or higher will round to 25, and a difference less than 12.5 will give me 0)

    Is there anyway that I can work around this problem while still maintaining the G2360-E2360 format?

    Any help would be greatly appreciated!
    Last edited by Jake_San; 10-21-2022 at 11:53 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: MROUND Formula for Ordering System

    This ???

    =IF((G20-E20)>0,MAX(MROUND((G20-E20),25),25),IF((G20-E20)<0,0))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    10-21-2022
    Location
    Indiana, America
    MS-Off Ver
    Microsoft 365
    Posts
    7

    Re: MROUND Formula for Ordering System

    Almost perfect! The only problem remaining then would be that if the answer is perfectly 900 the result becomes 「FALSE」.

  4. #4
    Registered User
    Join Date
    10-21-2022
    Location
    Indiana, America
    MS-Off Ver
    Microsoft 365
    Posts
    7

    Re: MROUND Formula for Ordering System

    Actually I was able to fix the False result problem by throwing in an equal sign in the equation. However, this formula only fixes the problem for the values between 875-900. Aka 899 will properly result in 25 pcs. However, 874 does not result in 50 pcs.

    I would ideally like 899 = 25 pcs, 874 = 50 pcs, 849 = 75 pcs, etc.

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: MROUND Formula for Ordering System

    Perhaps, =IF(G20-E20>12.5,25,0)

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: MROUND Formula for Ordering System

    Try


    =IF((G20-E20)>0,(INT((G20-E20-1)/25)+1)*25,IF((G20-E20)<0,0,""))

  7. #7
    Registered User
    Join Date
    10-21-2022
    Location
    Indiana, America
    MS-Off Ver
    Microsoft 365
    Posts
    7

    Re: MROUND Formula for Ordering System

    John, you're a lifesaver my friend, this one works perfectly. I appreciate the help from Joseph as well!

    Going to mark this thread as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help Using MROUND in A Formula
    By gaspower in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2015, 08:28 PM
  2. Vba ordering and inventory system
    By kent101 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2014, 09:14 PM
  3. Ordering System
    By kent101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2014, 10:24 PM
  4. VBA Ordering User form for Purchase Ordering.
    By caf20012 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-10-2014, 01:50 PM
  5. [SOLVED] help with setting up stock ordering system using excel
    By nikm in forum Excel General
    Replies: 17
    Last Post: 07-18-2013, 10:29 AM
  6. MROUND formula
    By SaschaB in forum Excel General
    Replies: 2
    Last Post: 10-20-2011, 10:43 AM
  7. Ordering system using macro
    By ashvik in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2007, 12:58 PM

Tags for this Thread

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