You are here:

- Home
- Computing/Technology
- Business Software
- Excel
- formula error

Advertisement

Hi Nathan

I wonder if you could help me with this problem? The following formula works well:

=IF(CZ11=1(COUNTIFS($B$15:$B$2314,"11",$DI$15:$DI$2314,">=12")/$DC$8*100))

However when I add the following condition:

=IF(CZ11=1(COUNTIFS($B$15:$B$2314,"11",$DI$15:$DI$2314,">=12")/$DC$8*100,IF(CZ11=2(COUNTIFS($B$15:$B$2314,"11",$DI$15:$DI$2314,">=15")/$DC$8*100))))

I get an error message

Could you tell me what I am doing wrong?

Chris Mitchell

Christopher:

Actually, neither formula should be working for you. The first formula is missing a comma. I added in the appropriate comma... and also put in a zero for if the IF function is false:

=IF(CZ11=1,(COUNTIFS($B$15:$B$2314,"11",$DI$15:$DI$2314,">=12")/$DC$8*100),0)

In the longer formula I presume you are trying to split where the existing comma is located for TRUE and FALSE. You have some misplaced parenthesis too.

=IF(CZ11=1,(COUNTIFS($B$15:$B$2314,"11",$DI$15:$DI$2314,">=12")/$DC$8*100),IF(CZ11=2,(COUNTIFS($B$15:$B$2314,"11",$DI$15:$DI$2314,">=15")/$DC$8*100),"0"))

Once again, I am making some assumptions here without actually seeing your spreadsheet.

An IF function:

=IF(logical statement,value if true, value is false)

I hope that helps!

- Ask a Question

Rating(1-10) | Knowledgeability = 10 | Clarity of Response = 8 | Politeness = 10 |

Comment | Nathan spotted my error very quickly |

This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

Answers by Expert:

Microsoft Excel questions related to advanced formulas, Pivot Tables, filters, forms, graphs, and just about anything else (

I have been using spreadsheets since Lotus 1-2-3 was released. **Education/Credentials**

Certified Public Accountant (CPA)