+ Reply to Thread
Results 1 to 4 of 4

Struggling with IF

Hybrid View

KClark Struggling with IF 08-06-2011, 04:27 PM
JBeaucaire Re: Struggling with IF 08-06-2011, 05:02 PM
kvsrinivasamurthy Re: Struggling with IF 08-10-2011, 02:46 AM
nazmul_muneer Re: Struggling with IF 08-10-2011, 04:37 AM
  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    Baton Rouge, Louisiana
    MS-Off Ver
    Excel 2003
    Posts
    3

    Struggling with IF

    Can someone help me?

    Here's my IF function

    =IF(B9="PM",(C9*114.16),IF(B9="SE",(C9*100)))

    This works when I put PM in cell B9 but when I select SE it places a "False" in the cell. What am I doing wrong?

    I have several different pay grades to place in the B9 cell and when I enter the different pay grade I need C9 to muliple by their respective hourly rate. In this case the PM rate is $114.16.

    Please Help!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Struggling with IF

    Create an alphabetical "array" of the codes, then a matching array of the rates, then use those arrays in a normal LOOKUP() formula:

    =C9 * LOOKUP(B9, {"AR", "PM", "SE"}, {95, 114.16, 100})


    Another way, you could create a TABLE on your sheet somewhere, perhaps columns AA:AB
        AA   AB
    1   AR   95
    2   PM   114.16
    3   SE   100
    4   XX   125
    ...then use a VLOOKUP against that table:

    =C9 * VLOOKUP(B9, $AA:$AB, 2, 0)

    With this method, the table would not have to be alphabetical.
    Last edited by JBeaucaire; 08-06-2011 at 05:06 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Struggling with IF

    hI
    In your formula you have not decided if B9<>"PM" or "SE".ie in second IF B9="SE" gives C9*100 If B9<>"SE" what is value.Asuming that IF B9<>"SE" the value is C9*50 the formula changed is below.Make suitable change required.
    hope it works.


    =IF(B9="PM",(C9*114.16),IF(B9="SE",(C9*100),C9*50))

  4. #4
    Registered User
    Join Date
    06-21-2011
    Location
    Dhaka
    MS-Off Ver
    Excel 2003, 2007
    Posts
    20

    Re: Struggling with IF

    Actually your formula is correct.
    I think you select "PM" and "SE" from list.
    See where you type "SE", it is not exactly SE, it may be " SE" or "SE "
    Plz see again

    Muneer

+ 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