0

I have been trying to figure this out for a good while, but just cant get it. I have no idea what I've done wrong in this formula.

I think that it is a nested IF formula but it still says entered too many arguments for this function.

=IF(C12={0,1,2,3,4,5},"0","", IF(C12={6,7,8},"25","", IF(C12={9,10},"30","", IF(C12>10,"35",""))))

Can someone please tell me what i'm doing wrong here?

Edit: Thanks to @timotree my original problem is solved. But now a new one has arose, now that the cells are correctly showing what i want them to automatically it seems i cannot sum them together. For example this formula is used in cells E12-E21, i want to total these cells in E22. But as it is now i am only getting 0 even if cells E12-E21 are populated with values from 25-35.

Edit 2: 2nd problem solved again by @timotree, thanks to everyone else for helping as well.

  • For the future, this probably should've gone on Stack Overflow. – timotree Dec 4 '16 at 23:12
  • 1
    @timotree No, it shouldn't. Formula questions are a perfect fit for SuperUser, too. – teylyn Dec 4 '16 at 23:18
  • @teylin Oh okay. Thanks for reminding me. – timotree Dec 4 '16 at 23:20
  • @timotree Also, at-mentioning only works if you spell the name correctly..... there is a pop up that helps you do that. – teylyn Dec 4 '16 at 23:34
  • @teylyn I know how to use the site. I appreciate your advice but you could be a little less condescending about my typo. :-P – timotree Dec 4 '16 at 23:51
1

Examples

Actual IF syntax

=IF(logical_expression, value_if_true, value_if_false)

source

The way you used it was

=IF(C12={0,1,2,3,4,5},"0","", IF(C12={6,7,8},"25","", IF(C12={9,10},"30","", IF(C12>10,"35",""))))
              PROBLEM IS HERE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This translates to

=IF(logical_expression, value_if_true, value_if_false, another_if_statement)
                                     PROBLEM IS HERE ^^^^^^^^^^^^^^^^^^^^^^

I think what you meant to do was

=IF(C12={0,1,2,3,4,5},"0", IF(C12={6,7,8},"25", IF(C12={9,10},"30", IF(C12>10,"35",""))))

Explanation

The change I made is that I removed the ,"" from every IF except for the last one.

This works because each of the nested IFs only evaluate when logical_expression is false otherwise it will just return the value associated with that if.

  • If you have any feedback please let me know before downvoting! – timotree Dec 4 '16 at 23:00
  • Thank you very much, that solved it. Do you know of any way that i can now use these true values (0, 25, 30, 35) to autosum a total? Because as of now they just autosum to 0. (using this formula for multiple rows) – tony gouveia Dec 4 '16 at 23:09
  • @tonygouveia What do you mean by autosum? – timotree Dec 4 '16 at 23:11
  • I am using this formula on multiple rows and want to total them automatically (35+25+30=90 for example) but as it is now my autosum =SUM(E12:E21) totals to 0 only – tony gouveia Dec 4 '16 at 23:15
  • @tonygouveia You want to sum a line of cells together? – timotree Dec 4 '16 at 23:17
0

AutoSum or SUM will not work on anything but numbers. Your formula result is not a "number"

SUM Syntax

Use the VALUE Function to convert your formula result to a number that you can then AutoSum.

Example illustrating IF formulas WITH the VALUE function which returns the SUM you require.

VALUE Function

Description

Converts a text string that represents a number to a number.

Syntax

VALUE(text)

The VALUE function syntax has the following arguments:

Text    Required. The text enclosed in quotation marks or a reference to a cell containing the text you want to convert.

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.