+ Reply to Thread
Results 1 to 5 of 5

Nested if function

  1. #1
    Registered User
    Join Date
    01-08-2016
    Location
    Saudi
    MS-Off Ver
    2007
    Posts
    6

    Nested if function

    I need to resolve a nested if function. The requirement is I have basic salary, grade and the ceiling value and need to calculate the TRA based on the conditions. If the grade is less than 12 and the 10% basic is more than 1000 then the TRA is 1000 else 10% basic. If the grade is greater than or equal to 12, and the 10% basic is more than 2000 then the TRA should be 2000 else 10% of basic. Can anyone help me to resolve this by using if function (with or without AND/OR etc.,)? Thanks.

  2. #2
    Forum Contributor
    Join Date
    12-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Nested if function

    try this
    =IF(IF(AND(A2<12, (0.1*B2)>1000), 1000, (0.1*B2)), IF(AND(A2>=12, (0.1*B2)>2000), 2000, (0.1*B2)))

    view my video of if with and

    https://www.youtube.com/watch?v=a66rYNJWi-w

    http://www.easyexcelanswers.com

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Nested if function

    Misread requirement
    Last edited by JohnTopley; 01-08-2016 at 02:20 PM.

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Nested if function

    Welcome to the forum.

    If I understand you correctly, you want this:
    If the grade is less than 12 AND 10% of basic salary is greater than or equal to 1000, then TRA is 1000, otherwise it's 10% of basic salary.
    If the grade is equal to or greater than 12 AND 10% of basic salary is greater than or equal to 2000, then TRA is 2000, otherwise it's 10% of basic salary.
    If that's correct, then this should work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Edit: A2 = basic salary, B2 = grade
    Last edited by Aardigspook; 01-08-2016 at 02:21 PM. Reason: State what A2 and B2 are
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  5. #5
    Forum Contributor
    Join Date
    12-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Nested if function

    if neither condition

    =iferror(IF(IF(AND(A2<12, (0.1*B2)>1000), 1000, (0.1*B2)), IF(AND(A2>=12, (0.1*B2)>2000), 2000, (0.1*B2))), "not correct")

+ 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. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  2. COUNTIF/COUNTIFS function + nested user-defined function
    By shamjamali in forum Excel General
    Replies: 1
    Last Post: 05-12-2015, 09:12 PM
  3. [SOLVED] Nested Function With Division - Receiving #VALUE! Function Error
    By DDM64 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-17-2013, 01:16 PM
  4. nested MATCH function within the INDEX function
    By thechoosenonesdream in forum Excel General
    Replies: 4
    Last Post: 10-25-2012, 03:55 PM
  5. [SOLVED] Nested AND function within IF function is only addressing logical1 but not logical2
    By betic in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-20-2012, 09:17 AM
  6. Replies: 9
    Last Post: 07-02-2012, 07:02 PM
  7. [SOLVED] Offset function with nested match function not finding host ss.
    By MKunert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2006, 06:50 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