+ Reply to Thread
Results 1 to 5 of 5

Calculate by Groups of 4

  1. #1
    Registered User
    Join Date
    09-29-2006
    Location
    NC -USA
    Posts
    6

    Calculate by Groups of 4

    I am trying to do a simple Excel calculation.
    I am trying an IF with nested IF statements but I have to hard code the numbers and then it is not to infinity.
    We sell an item in groups of 4.
    When a cell contains the number that the customer needs then I want to know how many 'groups' of 4 they need to order.
    Example
    Customer Needs 12
    A1 = 12/4
    Answer in C3 = 3 -sets of 4 needed to be ordered.
    ------------------
    Customer needs 13
    A1 = 13/4
    Answer in C3 = 4 -sets of 4 needed to be ordered.
    -----------------------------------
    0/4 = 0 sets needed
    1/4 = 1 sets needed
    2/4 = 1 sets needed
    3/4 = 1 sets needed
    4/4 = 1 sets needed
    5/4 = 2 sets needed
    6/4 = 2 sets needed
    7/4 = 2 sets needed
    8/4 = 2 sets needed
    9/4 = 3 sets needed
    10/4 = 3 sets needed
    11/4 = 3 sets needed
    12/4 = 3 sets needed
    13/4 = 4 sets needed
    14/4 = 4 sets needed
    15/4 = 4 sets needed
    16/4 = 4 sets needed
    17/4 = 5 sets needed
    18/4 = 5 sets needed
    19/4 = 5 sets needed
    20/4 = 5 sets needed
    21/4 = 6 sets needed
    22/4 = 6 sets needed
    23/4 = 6 sets needed
    24/4 = 6 sets needed
    so on down .......

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    if your quantity is entered in col B

    =IF(MOD(B1,4)<>0,INT(B1/4)+1,B1/4)

    and copy down as far as you need

    HTH

    Ed

  3. #3
    Registered User
    Join Date
    09-29-2006
    Location
    NC -USA
    Posts
    6

    Calculate by groups of 4

    That worked.. You are awsome.....
    Thanks

  4. #4
    Registered User
    Join Date
    02-22-2006
    Posts
    28

    Calculate by Groups of 4

    Hi,

    Enter this formula in cell $B$1
    =IF(OR(ISNUMBER(A1)=FALSE,A1<=0),0,IF(MOD(A1,4)<>0,INT(A1/4)+1,INT(A1/4)))

    Enter your test values in cell $A$1

    See if this is what you are looking for.

    Best Wishes,
    mtpSuresh

  5. #5
    Registered User
    Join Date
    09-29-2006
    Location
    NC -USA
    Posts
    6

    Calculate groups of 4

    That worked... This is a great forum...
    Thanks

+ 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