+ Reply to Thread
Results 1 to 9 of 9

How to sum 3 or more results in 1 cell

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Thumbs up How to sum 3 or more results in 1 cell

    Hi dears,

    This thing stuck me up..may be i wil be little for you guys..bue very hard for me at the moment..

    I have Cell A1 and B1..

    Cell A1 is for Number of Days..
    Cell B1 is for an amount which is based on days..

    I have 3 kind of Rates..like..days from 1 to 10 is 3 USD
    Days 11 to 20 is 6 USD and Days 20 to onward is 12 USD.

    Now what I want if Cell A1 has days "5" then B1 should give me result 5x3 = "15", but if A1 has days 15 than B1 should give me result "60" because first 10 days (10x3) and remaing 5 days (5x6) total 30 and as well as if days are more than 20 than same practice..

    How i solve it..

    Thanks in advance for your costly time and help.
    Last edited by tariqnaz2005; 03-14-2010 at 10:52 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: How to sum 3 or more results in 1 cell

    try this: =A1*LOOKUP(A1;{0;10;20};{3;6;12})

    (replace ; with , if you get error)
    Never use Merged Cells in Excel

  3. #3
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: How to sum 3 or more results in 1 cell

    Hi zbor, thaks for quick reply,

    but this is not my requirement..I want if Cell A1 is equal to 11 than reply 36 (cuz from 1 to 10 days rate is 3 dollars and and than next days i.e. 11 to 20 rat is USD 6, and 20 to onward is USD 12..

    so if Cell A1 is = 5 than reply is 5x3 = 15,
    if cell A1 is = 12 than rely is (10x3)+(2x6)= 32
    if cell A1 is = to more than 20 i.e 25 than result is (10x3=30) + (10x6=60) + (5x12=60) = 150

    Sorry if could not make u well understand.

    Thanks

  4. #4
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: How to sum 3 or more results in 1 cell

    Thanks Zbor, but i want (first 10 days x 3) + (Second 10 days x6) + other all days x 12)= my result ..like..for 25 dsys reply is 150..cuz (10 x3 + 10 X6 + 5 x 12)..thanks for understand..and help

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to sum 3 or more results in 1 cell

    Try this,

    =IF(A7<=10,A7*3,IF(AND(A7>10,A7<=20),30+((A7-10)*6),30+60+((A7-20)*12)))
    This would need changing if your rate changes

    A more flexible version is demonstrated in the workbook attached

    Change your rate to see the difference.
    Attached Files Attached Files
    Last edited by Marcol; 03-14-2010 at 10:25 AM. Reason: Fixed Tag

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: How to sum 3 or more results in 1 cell

    try this...

    =MIN(A1;10)*3+MIN(A1-10;10)*6+MAX(A1-20;0)*12

    I belive you wanted to write: if cell A1 is = 12 than rely is (10x3)+(2x6)= 42

    (replace ; with , if needed)

  7. #7
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: How to sum 3 or more results in 1 cell

    I dont knwo whats going my ID here excel forum from last one week..i can see reply of my thread like..right now 5 replies..but then i click it to open i can not see any thing there..only first 2 post..

    i dont knwo how to solve it..

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: How to sum 3 or more results in 1 cell

    I really don't know.. I see whole 7 posts

  9. #9
    Forum Contributor
    Join Date
    07-21-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2019
    Posts
    292

    Re: How to sum 3 or more results in 1 cell

    Yes Yes Yes..i got ...

    Thats great job....i never thought i would be possible...oh my god..you are geneous..

    Thanks for every one..and sepcially for Mr..morcal..your formuala is works perfect..

    Mr. zbor..your formula is short..but it gives sor error even i changed ; to '..

    However..you all solved my problem..

    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