-1

I'm currently working on a uni excel assignment and my if function continuously says I have too many arguments.

=IF(C7="A",D7,IF(C7="B",IF(D7<=$C$3,0,D7-$C$3,IF(D7="C",IF(D7<=$D$4,0,D7-$C$4))))

this is the if function essentially this formula works out how many minutes a client needs to pay for so if it's a the client pays for whatever they use as they have 0 free minutes, if its B they only pay if they use more than 120 minutes and if it's C they only pay once they have used more than 300 minutes

sorry if this an obvious solution

thanks

frankie

  • it would help if i sent the right function ahaha =IF(C7="A",D7,IF(C7="B",IF(D7<=$C$3,0,D7-$C$3,IF(D7="C",IF(D7<=$D$4,0,D7-$C$4)))) – Frankie Francis Feb 21 '18 at 15:04
  • Well, I did it just now, but next time, it would be better if you edit it instead of leaving the wrong function in the question. – Leun4m Feb 21 '18 at 15:10
  • sorry, I didn't mean to leave it in there my apologies – Frankie Francis Feb 21 '18 at 15:11
  • It's fine :) In general, I would suggest to declare and use names in Excel, they make your functions better readable and everyone else who uses the spreadsheet will know what's the function inside the function is supposed to do. – Leun4m Feb 21 '18 at 15:14
1

Try this:

=IF(C7="A",D7,IF(C7="B",IF(D7<=$C$3,0,D7-$C$3),IF(D7="C",IF(D7<=$D$4,0,D7-$C$4))))

I think you missed the closing bracket in this part: IF(D7<=$C$3,0,D7-$C$3)

0

Try

=IF(C7="A",D7,IF(C7="B",IF(D7<=$C$3,D7-$C$3,IF(D7="C",IF(D7<=$D$4,0,D7-$C$4)))))

This in theory works as a formula. If it suits your requirements is too hard to say with the information provided.

This is the part of your original code that had too many arguments:

IF(D7<=$C$3,0,D7-$C$3,IF(D7<=$D$4,0,D7-$C$4))

You have the logic: D7<=$C$3

True Value: 0

FALSE Value: D7-$C$3

And then a comma followed by IF(D7<=$D$4,0,D7-$C$4)

This third part is the extra argument etc.

  • this formula works but returns a negative value, essentially this formula works out how many minutes a client needs to pay for so if it's a the client pays for whatever they use as they have 0 free minutes, if its B they only pay if they use more than 120 minutes and if it's C they only pay once they have used more than 300 minutes – Frankie Francis Feb 21 '18 at 15:15
  • @FrankieFrancis as i say i cant work it out without seeing the data, and desired outputs etc. – PeterH Feb 21 '18 at 15:17
  • I'm new to this website is there a way to send Images – Frankie Francis Feb 21 '18 at 15:21
  • @FrankieFrancis Read this: superuser.com/help/formatting – Arun Vinoth Feb 21 '18 at 16:14
  • Upload the image to imgur.com and EDIT your question to add the link. – Bandersnatch Feb 21 '18 at 16:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.