# Thread: IF Problem (Excel 2002)

1. ## IF Problem (Excel 2002)

Hi

I can only count 7 IF's here but Excel is complaining the there are too many arguments

=IF(AV40>4300,AV40-BM2,"",IF(AV40>3000,AV40-BM3,"",IF(AV40>2000,AV40-BM4,"",IF(AV40>1000,AV40-BM5,"",IF(AV40>800,AV40-BM6,"",IF(AV40>430,AV40-BM7,"",IF(AV40>200,AV40-BM8,"")))))))

Many Thanks

2. ## Re: IF Problem (Excel 2002)

Hi

I am as my signature say a fool , too many "" ""

Sorry to have bothered anybody

3. ## Re: IF Problem (Excel 2002)

Do you mean:
=IF(AV40>4300,AV40-BM2,IF(AV40>3000,AV40-BM3,IF(AV40>2000,AV40-BM4,IF(AV40>1000,AV40-BM5,IF(AV40>800,AV40-BM6,IF(AV40>430,AV40-BM7,IF(AV40>200,AV40-BM8,"")))))))

This has nothing to do with the number of IFs.

An IF is:
=if(condition, truepart, falsepart)

You have:
=if(condition, truepart, "", falsepart)

and I removed the null...

Note: With this type of setup I would prefer to create a table and use Vlookup. It is easier to edit later, more clear, and does not have the limit to the number of IFs (see Excel User Tip: Alternatives to Nested IF Functions for an example)

Steve

Hi Steve