+ Reply to Thread
Results 1 to 12 of 12

Problem with nested IF's and something else.

  1. #1
    Registered User
    Join Date
    10-28-2013
    Location
    Latvia, Riga
    MS-Off Ver
    MS Office 2007
    Posts
    2

    Problem with nested IF's and something else.

    Hello!
    I'm some sort of amateur on complexed combinations of excel functions, so don't judge me for my non"excel"ish language. :D
    I want to make an automatic column in my table of sold items, which would calculate bonuses depending on requirements, AND IF requirements met,ONLY then calculate bonuses depending on item price. AND thats a problem.
    So, requirements is 355Ls/day or 3 items/day. If person meets these requrements, then he gets bonus. Bonuses depends on sold item price: 250ls (gets 2ls bonus), 300-450Ls (gets 3,5ls bonus) etc.
    I need something like - IF(item price>=355ls OR quantity>=3) then he gets a bonus depending on- IF(item price<250;0"No bonus";IF(item price>=250;2ls;IF(item price>=300;3,5ls.
    I hope somebody will understand, what I need, and will help me on that. If no, then i will continue to type it with my index :D
    Example of material is in attachment. Thanks.
    Attachment 273935
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Problem with nested IF's and something else.

    Hi and welcome to the forum

    Not sure what bonus you want to give, but this will determine if 1 is due or not, based on your rules...
    =IF(A5=A4,"",IF(OR(SUMIF($A$5:$A$21,A5,$C$5:$C$21)>=355,COUNTIF($A$5:$A$21,A5)>=3),"Bonus",""))

    (change the 355 for the "small"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: Problem with nested IF's and something else.

    You could try this (for the Big Stuff calculation):
    In E5:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag down to E23

    (The little stuff):
    In L5:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    drag down to L23

    Hope this Helps

    Edit-
    just noticed, in your opening post, you are using ";" as delimeters so
    E5:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and
    L5:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I think I changed them all, but if you still get errors, I would check to make sure the ","'s have all been changed to ";"'s
    Last edited by dredwolf; 10-28-2013 at 11:32 AM.
    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
    Forum Contributor vamosj's Avatar
    Join Date
    04-23-2004
    Location
    Oregon
    MS-Off Ver
    2010
    Posts
    294

    Re: Problem with nested IF's and something else.

    There was one question I had about the requirements to the bonus though, if they sell 3 of a little item such as the op one at 69.99 then do you base your bonus calculation on the item price or the total price?
    Janos S. Vamos
    Data Systems Technician/Fire Controlman PO1(SW/AW)
    US Navy Retired


    Remember, Record Macro can be your friend for figuring out solutions.

    Good or Bad, let me know how I did by clicking on the "Add Reputation" * just to the lower left of here. it only takes a few seconds to let someone know.

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

    Re: Problem with nested IF's and something else.

    That is a good Question, My formulas are based on total sales...so would need some editing to work if its for individual items..

  6. #6
    Registered User
    Join Date
    10-28-2013
    Location
    Latvia, Riga
    MS-Off Ver
    MS Office 2007
    Posts
    2

    Re: Problem with nested IF's and something else.

    That was quite fast answer.
    Requirements are based on TOTAL sales of the day. But bonuses goes on every item, if requirements met.
    Thanks. I thought I'll have to wait at least a week for an answer. :D
    Last edited by DominoEffect; 10-28-2013 at 11:54 AM.

  7. #7
    Forum Contributor vamosj's Avatar
    Join Date
    04-23-2004
    Location
    Oregon
    MS-Off Ver
    2010
    Posts
    294

    Re: Problem with nested IF's and something else.

    Here is what I came up with. I've also added my notes and logic behind it so you could better understand how i came up with it and maybe learn a little something yourself.

    I also adjusted the table to make your bonus program static in case any of the requirements or amounts change.

    Quick peek at the formula's.

    Big Items (Row 5)
    Please Login or Register  to view this content.

    Little Items (Row 5)
    Please Login or Register  to view this content.

    Hope this helps!
    Attached Files Attached Files

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

    Re: Problem with nested IF's and something else.

    So, it is possible for the Bonus to equal 0 ( not likely, but possible, if all the utems sold fall under 250 (in the Big Stuff category) for example) ?
    And would the quantity of the item sold affect this as well?

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

    Re: Problem with nested IF's and something else.

    Okay this one does it for the individual sales, based of the daily totals :
    (Note, I have changed your bonus table a bit, see attached)
    in C5:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    drag down to C23

    In L5:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    drag down to L23

    (I haven't switched the comma's to semi-colon's here, but the workbook should do it when you download it)

    Hope this helps
    Attached Files Attached Files

  10. #10
    Forum Contributor vamosj's Avatar
    Join Date
    04-23-2004
    Location
    Oregon
    MS-Off Ver
    2010
    Posts
    294

    Re: Problem with nested IF's and something else.

    Dredwolf, I was playing around with yours to see if I could learn anything from it, and there seems to be some errors in it, (trying to pick apart right now to see what I can find and learn). When changing the quantity the bonus increases to a value based on the qty sold * price instead of a set value as determined by the table. Unless I'm misreading what he's stating and it is indeed based on qty of the item and not a flat rate.



    I'm also trying to see why ou included the dates into the equation? Is there something I'm not seeing here on that one?

    $A$5:$A$23=A5

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

    Re: Problem with nested IF's and something else.

    @ vamosj
    The reason for including the dates is that the bonus is based on daily sales numbers, as per opening post, I included a per item sold, as that was mentioned in OP's last post (#6), and I was not sure if they wanted it calculated on total sale of that item, or on a per item basis, so I basically guessed

  12. #12
    Forum Contributor vamosj's Avatar
    Join Date
    04-23-2004
    Location
    Oregon
    MS-Off Ver
    2010
    Posts
    294

    Re: Problem with nested IF's and something else.

    Gotcha, thanks.

+ 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] nested if then problem
    By Bobby789 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2013, 10:57 AM
  2. Nested If problem!
    By Thu Rein in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-26-2013, 06:12 PM
  3. [SOLVED] Nested IF/OR problem
    By muszynka in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-30-2012, 03:51 PM
  4. Nested IF, AND Problem
    By jamieray in forum Excel General
    Replies: 2
    Last Post: 09-15-2011, 07:08 AM
  5. nested if vba problem
    By leitek.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2006, 05:15 PM

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