Help required in modifying IF Statement

grcshekar71

New Member
Joined
Apr 17, 2020
Messages
10
Office Version
  1. 2007
Platform
  1. Windows
=IF(INDEX(EmployeeMaster!O:O,MATCH(H2,EmployeeMaster!A:A,0))="Y",IF(SUM(Y2:AD2)>=SUM(S2:X2),0,IF(SUM(S2:X2)>15000,15000*12%,SUM(S2:X2)*12%)),0).

This formula is intended to work as follows.

IF SUM(S2:X2) - SUM(Y2:AD2) >= SUM(S2:X2) * 12%
THEN RESULT
ELSE 0

Also H2,EmployeeMaster!A:A,0))="Y" is only a flag check if Y then continue evaluating formula else no

But it is not working. It works only if SUM(Y2:AD2) = SUM(S2:X2)
 
but in your example the two conditions are false. could you again, without formulas, describe the conditions. Write an example with values for each condition.
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I still have an error.

=IF(INDEX(EmployeeMaster!O:O,MATCH(H2,EmployeeMaster!A:A,0))="Y",IF((AND(SUM(S2:X2)<=Parameters!$B$5,
SUM(S2:X2)-SUM(Y2:AD2)>=SUM(S2:X2)*Parameters!$B$6%)), SUM(S2:X2)*Parameters!$B$6%,IF((AND(SUM(S2:X2)>Parameters!$B$5, SUM(S2:X2)-SUM(Y2:AD2)>=Parameters!$B$5*Parameters!$B$6%)), Parameters!$B$5*Parameters!$B$6%,0)))

If EmployeeMaster!O:O,MATCH(H2,EmployeeMaster!A:A,0))="Y". If this is "N" it is displaying at FALSE instead of 0
 
Upvote 0
IF EmployeeMaster!O:O,MATCH(H2,EmployeeMaster!A:A,0))="Y" only then formula should work else 0

After this, Condition 1
If SUM(S2:X2)>15000 AND SUM (S2:X2)*12%> SUM (Y2:AD2) THEN SUM (S2:X2)*12% ELSE 0

If SUM(S2:X2)<=15000 AND 15000*12%> SUM (Y2:AD2) THEN 15000*12% ELSE 0
 
Upvote 0
This works

=IF(INDEX(EmployeeMaster!O:O,MATCH(H2,EmployeeMaster!A:A,0))="Y",IF((AND(SUM(S2:X2)<=Parameters!$B$5,
SUM(S2:X2)-SUM(Y2:AD2)>=SUM(S2:X2)*Parameters!$B$6%)), SUM(S2:X2)*Parameters!$B$6%,IF((AND(SUM(S2:X2)>Parameters!$B$5, SUM(S2:X2)-SUM(Y2:AD2)>=Parameters!$B$5*Parameters!$B$6%)), Parameters!$B$5*Parameters!$B$6%,0)),0)
 
Upvote 0

Forum statistics

Threads
1,221,444
Messages
6,159,914
Members
451,603
Latest member
SWahl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top