+ Reply to Thread
Results 1 to 5 of 5

Mutiplying Given number with parts (first 2 , next 2 , next next 2 , remaining ...)

Hybrid View

  1. #1
    Registered User
    Join Date
    06-29-2012
    Location
    hyd
    MS-Off Ver
    Excel 2007
    Posts
    23

    Mutiplying Given number with parts (first 2 , next 2 , next next 2 , remaining ...)

    Hi Experts,

    I need a formula for below logic , please help me
    Excel_Calc_2.xlsx
    Assume if cell c16 value 'X' integer
    then first 2 of 'X' should be multiplied with $50
    Next 2 of 'X' should be multiplied with $40
    Next Next 2 of 'X' should be multiplied with $30
    and rest of the 'X' values should be multiplied with $20.

    Please find the attached excel sheet for an example and details.
    The cells marked in green are the only cells you need to add formulas.

    Thanks in advance

    Thanks,
    Naveen
    Last edited by sqlindia; 01-22-2013 at 01:06 PM. Reason: marking as Solved

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,857

    Re: Mutiplying Given number with parts (first 2 , next 2 , next next 2 , remaining ...)

    Your spreadsheet doesn't quite match what you described so I changed it for

    0-2
    3-4
    5-6
    7-999 (arbitrary absolute maximum makes things a little more flexible)

    Also, instead of describing those ranges as text, I made them numbers you can actually calculate using them.

    See attached.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Mutiplying Given number with parts (first 2 , next 2 , next next 2 , remaining ...)

    Assuming you ACTUALLY wanted 0 orders to = 2
    In C16:
    =IF(C15<2,2,ROUNDUP(C15,0))
    Or , if only orders >0
    C16:
    =IF(AND(C15>0,C15<2),2,ROUNDUP(C15,0))

    In C19:
    =IF($C$16,2*B19,0)

    in C20:
    =(($C$16>(ROWS($C$19:C19)*2))+($C$16>(ROWS($C$19:C19)*2+1)))*B20+IF(AND($C$16>8, ROWS($C$19:C19)=3),($C$16-8)*B20,0)
    Drag to C22

    Hope this helps
    Last edited by dredwolf; 01-22-2013 at 12:04 PM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  4. #4
    Registered User
    Join Date
    06-29-2012
    Location
    hyd
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Mutiplying Given number with parts (first 2 , next 2 , next next 2 , remaining ...)

    excellent dredwolf , Thanks mate

    I am going through the formulas given by you.

    Thank,
    Naveen

    Quote Originally Posted by dredwolf View Post
    Assuming you ACTUALLY wanted 0 orders to = 2
    In C16:
    =IF(C15<2,2,ROUNDUP(C15,0))
    Or , if only orders >0
    C16:
    =IF(AND(C15>0,C15<2),2,ROUNDUP(C15,0))

    In C19:
    =IF($C$16,2*B19,0)

    in C20:
    =(($C$16>(ROWS($C$19:C19)*2))+($C$16>(ROWS($C$19:C19)*2+1)))*B20+IF(AND($C$16>8, ROWS($C$19:C19)=3),($C$16-8)*B20,0)
    Drag to C22

    Hope this helps

  5. #5
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Mutiplying Given number with parts (first 2 , next 2 , next next 2 , remaining ...)

    You are welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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