+ Reply to Thread
Results 1 to 16 of 16

IF statement and drop-down list

  1. #1
    Registered User
    Join Date
    07-05-2007
    Posts
    9

    IF statement and drop-down list

    Can I create a formula to return a calculation based on a certain value selected from a drop-down list?

    See attachment for more details. Thanks!!!
    Attached Files Attached Files

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi Nancy,

    Yes, But you would do better with a LOOKUP rather than IF

    If you ZIP a sample, and say what you want to achieve, we can look at it.

    Ed

  3. #3
    Registered User
    Join Date
    07-05-2007
    Posts
    9

    RE: sample of my question

    Does the attached Word doc not illustrate it sufficiently?

  4. #4
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi Nancy,

    It depends on how many rates you want to apply.

    For less than 7, if will do so for example

    If(d11="Associate",E11*100,if(d11="paralegal",E11*50,if........)))

    If there are more than 7 you need to use a look up

    Ed

  5. #5
    Registered User
    Join Date
    07-05-2007
    Posts
    9

    RE: Reply to question

    Each user (attorney) will input an hourly rate for each of the 4 values.

    For example: Partner $250, Associate $150, Paralegal $75, Other $40. Those are constant values in the cells at the top of the page.

    If Partner is selected from the drop-down and he worked 2 hours, the formula in the FEE column should return the partner rate (250) times 2, or $500.
    My idea was:
    IF [cell with drop-down]=partner, then cell = HOURS*250

    That kind of thing.

    If the user had chosen Associate, the result would have been $300 becasue the formula would have chosen the Associate rate (150) instead. Or,

    IF [cell with drop-down]=associate, then cell = HOURS*150

  6. #6
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Just substitute the numbers I put in with the cell reference instead eg $e$2

    Use the dollar signs so that whwn you copy it down, it keeps referring to that cell.

    Ed

  7. #7
    Registered User
    Join Date
    07-05-2007
    Posts
    9

    Here is my result

    =IF(C11="Partner",D11*$C7),IF(C11="Associate",D11*$D7),IF(C11="Paralegal",D11*$E7),IF(C11="Other",D11*$F7)))

    But it is not working.

    Do I have too many or too few parentheses at the end?

  8. #8
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Try this

    =IF(C11="Partner",D11*$C$7,IF(C11="Associate",D11* $D$7,IF(C11="Paralegal",D11*$E$7,IF(C11="Other",D1 1*$F$7))))

    Ed

  9. #9
    Registered User
    Join Date
    07-05-2007
    Posts
    9

    Thank you!

    THANKS!

    That works.

  10. #10
    Registered User
    Join Date
    07-05-2007
    Posts
    9

    One more thing

    Presently, without data, the column with the formula displays FALSE for each cell.

    How can I make it just appear blank?

  11. #11
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Glad it's working, to show blank use amended formula below

    =IF(C11="Partner",D11*$C$7,IF(C11="Associate",D11* $D$7,IF(C11="Paralegal",D11*$E$7,IF(C11="Other",D1 1*$F$7,""))))

    Ed

  12. #12
    Registered User
    Join Date
    07-05-2007
    Posts
    9

    Smile THANKS again!

    Fantastic. Made my day!

  13. #13
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Thanks for the feedback

    Ed

  14. #14
    Registered User
    Join Date
    06-15-2007
    Posts
    7
    Could i have the final version, i have to do somthing similar and i cant work it out...i could use it as a guide!

    thanks

  15. #15
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi main_man,

    You need to start a new thread rather than trying to add onto this one.

    Give us what your are trying to achieve and the problem you have.

    Ed

  16. #16
    Registered User
    Join Date
    06-15-2007
    Posts
    7
    ive worked it out now...thanks for your offer to help edmac

+ 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