Results 1 to 2 of 2

Thread: Dividing the number and setting the maximum in cells

  1. #1

    Dividing the number and setting the maximum in cells



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hey everyone!
    So basically, i need help with dividing the number. I have for example 20 hours(A1) which have to be divided into 8h + the rest. So, 8(B2)+8(B3)+4(B4) hours, and I have no idea how to come to that. I have tried few things, but I can only divide it by 8 and it doesn't go anywhere from that. I would be REALLY helpful if somebody would explain it to me, because i need to figure this out, urgently !

    Thank you so much for your help guys (and girls )

    Cheers, Lana

  2. #2
    Acolyte Canapone's Avatar
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    97
    Articles
    0
    Excel Version
    Excel 2010
    Hi,

    sure there are better solutions than the following

    In B1 and to the right

    Code:
    =IF(COLUMNS($A$1:A$1)>(INT(($A$1)/8)+(MOD($A$1,8)>0)),"",IF(COLUMNS($A$1:A$1)<=INT($A$1/8),8,MOD($A$1,8)))
    or in B2 and down

    Code:
    =IF(ROWS($A$1:$A1)>(INT(($A$1)/8)+(MOD($A$1,8)>0)),"",IF(ROWS($A$1:$A1)<=INT($A$1/8),8,MOD($A$1,8)))

    Regards
    Last edited by Canapone; 2013-11-02 at 02:30 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •