# Problem in applying IF formula for 25 conditions

Status
Not open for further replies.

##### New Member
Dear all,

Attached Excel file for reference.

Regards,

#### Attachments

• 16 KB Views: 4

#### bosco_yip

##### Excel Ninja
Hi,

Please use Sumifs function instead of 25 If function as per following set up.

In Result G3, enter formula:

=SUMIFS(C:C,A:A,E3,B:B,F3)

##### New Member
Hi,

Please use Sumifs function instead of 25 If function as per following set up.

In Result G3, enter formula:

=SUMIFS(C:C,A:A,E3,B:B,F3)

View attachment 82640

Dear Sir,
But My query is " If A3=1 & B3=1 then the result should be 1.
Likewise in all the 25 conditions (C3=1,C4=3,C5=6) etc.

Example formula i applied - =(IF(AND(U5>=1,V5<=1),"1",IF(AND(U5>=1,V5<=2),"3", IF(AND(U5>=1,V5<=3),"6", IF(AND(U5>=1,V5<=4),"10",IF(AND(U5>=1,V5<=5),"15", (After this its not calculating) IF(AND(U5>=2,V5<1),"2".

Attached Excel sheet for your reference.

Regards,

#### Attachments

• 17.1 KB Views: 2

#### bosco_yip

##### Excel Ninja
Dear Sir,
But My query is " If A3=1 & B3=1 then the result should be 1.
Likewise in all the 25 conditions (C3=1,C4=3,C5=6) etc.

Example formula i applied - =(IF(AND(U5>=1,V5<=1),"1",IF(AND(U5>=1,V5<=2),"3", IF(AND(U5>=1,V5<=3),"6", IF(AND(U5>=1,V5<=4),"10",IF(AND(U5>=1,V5<=5),"15", (After this its not calculating) IF(AND(U5>=2,V5<1),"2".

Attached Excel sheet for your reference.

Regards,