+ Reply to Thread
Results 1 to 3 of 3

IF function

  1. #1
    Registered User
    Join Date
    06-01-2009
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    IF function

    I tried the following formula in Excel 2003 but the last cell reference is highlight with a parameters error. Could anyone help me with this. If you need more info, let me know. Thanks!

    =IF(J12=40,J12,(X12/J12)*2080,IF(X12<1,000,X12*J12,(40/J12)*X12))

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    re: IF function

    An IF function has the syntax

    =IF(test,Do_if_TRUE,Do_if_FALSE)

    Your IF has a test [J12=40], a TRUE condition [J12], a FALSE condition [(X12/J12)*2080], at that point you need a closing parenthesis, you can't have any more (although you can nest further IFs in the TRUE or FALSE sections).

    Can you explain in words what you want the formula to do?

  3. #3
    Registered User
    Join Date
    06-01-2009
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Need help with IF function

    I have 3 types of employee classes that have annualized salaries calculated differently.

    If a person works 40 hours than the value in the annualized salary field is correct (IF B=40, then A).

    If the person works less than 40 hours and they are paid salary then the value in the annualized salary field is incorrect and I need to recalculate it by dividing annualized salary by hours worked and then multiply it by 2080 to get the correct value (If B<40 and A is >1,000, then (A/B)*2080.

    If the value in annualized salaries is less than $1,000 then I need to recalculate it by taking the annualized salary and multiplying it by hours worked (A<$1,000, then A*B). I need all these results to be in one cell.

    A= annualized salary
    B= std hours

    I think I see my error in logic. I can probably do a work-around by adding extra columns with formulas and an IF statement, but would rather have one formula if possible. 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