excelif-statementmultiple-arguments

Excel function IF with AND: Error too many arguments


I am in need of some assitance. My function is as follows:

IF(AND(C3="Monthly",D3="Regular"),800,IF(AND(C3="Monthly",D3="Student discount"),690,IF(C3="Weekly",D3="Regular"),250,IF(C3="Weekly",D3="Student discount"),200))

Basically I want my cell to show the amount due depending on if it's a weekly or monthly payment, and if it's a student or non student because there is a student discount (which changes the amount due). I have 2 other cells with dropdown menus where on one cell you can choose if it's monthly or weekly, and the second one you can choose if discount applies or not (student or regular).

Excel gives me an error saying that IF function can only support 3 arguments. Does anyone know what else I could use?

I was expecting it to work.


Solution

  • Looks like the problem is with the IF right after the "690": an IF should take 3 arguments but you provided it with 4 arguments.

    Try instead:

    =IF(AND(C3="Monthly", D3="Regular"), 800, IF(AND(C3="Monthly", D3="Student discount"), 690, IF(AND(C3="Weekly", D3="Regular"), 250, IF(AND(C3="Weekly", D3="Student discount"), 200, 0))))