Hi all,
In my worksheet there are two cells D8 and E8 where I have to input data and the outcome of the formula will be visible on M8 cell.
Below is the tabular representation of data input in cells, and their expected output
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Value in D8[/TD]
[TD]Value in E8[/TD]
[TD]Outcome[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]E[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]E[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD]E[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD]E[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]E[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]NA[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]NA[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD]NA[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD]NA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]NA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD][/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD][/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD][/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD][/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]>=85%[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]>=85%[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD]>=85%[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD]>=85%[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]>=85%[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]E[/TD]
[TD]<85%[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]<85%[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD]<85%[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD]<85%[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]<85%[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
The formula that I am using is as under:
With above code, most of the time, the outcome is expected, except in below two situations
[TABLE="width: 500"]
<tbody>[TR]
[TD]Value in D8[/TD]
[TD]Value in E8[/TD]
[TD]Real Outcome[/TD]
[TD]Expected Outcome[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]60%[/TD]
[TD]5[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD][/TD]
[TD]5[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
I am not able to find the error in the formula. Can you please guide me?
Thanks in advance.
In my worksheet there are two cells D8 and E8 where I have to input data and the outcome of the formula will be visible on M8 cell.
Below is the tabular representation of data input in cells, and their expected output
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Value in D8[/TD]
[TD]Value in E8[/TD]
[TD]Outcome[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]E[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]E[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD]E[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD]E[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]E[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]NA[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]NA[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD]NA[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD]NA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]NA[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD][/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD][/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD][/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD][/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]>=85%[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]>=85%[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD]>=85%[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD]>=85%[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]>=85%[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]E[/TD]
[TD]<85%[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]<85%[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]>=85%[/TD]
[TD]<85%[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]<85%[/TD]
[TD]<85%[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]<85%[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
The formula that I am using is as under:
Code:
=IF(E8="E",IF(OR(D8="E",D8="NA",D8>85%),10,5),IF(E8="NA",IF(OR(D8="E",D8="NA",D8>=85%),10,0),IF(E8="",IF(OR(D8="E",D8>=85%),5,0),IF(E8>=85%,IF(OR(D8="E",D8="NA",D8>=85%),10,5),IF(E8<85%,IF(OR(D8="E",D8>=85%),5,0))))))
With above code, most of the time, the outcome is expected, except in below two situations
[TABLE="width: 500"]
<tbody>[TR]
[TD]Value in D8[/TD]
[TD]Value in E8[/TD]
[TD]Real Outcome[/TD]
[TD]Expected Outcome[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD]60%[/TD]
[TD]5[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[TD][/TD]
[TD]5[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
I am not able to find the error in the formula. Can you please guide me?
Thanks in advance.