Need to correct this formula

sunny17

New Member
Joined
Jul 6, 2011
Messages
8
I need to modify a complex array formula.

Here's the logic....

1st condition:
if the value in column A matches with the value of column A in previous row;
Condition passes....
Then check
if the value in Column E has occurred for the 1st time for similar value of column A
Condition passes....
Then, the value in Nx = 100 - (Mx*100)

2nd Condition:
if the value in column A is not equal to the value of column A in previous row;
Condition passes.....
Then , the value in Nx = 100 - (Mx*100)

3rd Condition:
if the value in column A matches with the value of column A in previous row;
Condition passes....
Then check
if the value in column E has occured earlier for similar value of column A
Condition passes.....
Then, the value in Nx = Ny-(Mx*100)

Here,
Ny denotes the value of N where the Ex has occured last time.

and so on...

Please note that if value in A changes it should not take into consideration any values of E, M or N etc for any other values of A.

To implement this logic I've the formula "==IF(AND($A$2:$A12=A13,MATCH(E13,E:E,0)=ROW()),((100-(M13*100))/100),INDEX(N$2:N12,SMALL(IF(E$2:E13=E13,ROW(E$2:E13)),COUNTIF(E$2:E13,E13)-1)-1,1)-M13)" in N13.

But over here, the formula doesn't give me the expected result (75%).

Could you help me correct this?

 

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.

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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