Excel Formula - compare two set of cells and find return the result based on the logic

bb19august

New Member
Joined
Feb 1, 2019
Messages
18
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E (RESULT)

[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]Y[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]N[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]N/A[/TD]
[TD="align: center"]N/A[/TD]
[TD="align: center"]N/A[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]N/A[/TD]
[TD="align: center"]N/A[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]N/A[/TD]
[/TR]
</tbody>[/TABLE]

Need help with this as well.
Logic : C>A OR D>B = Y else N
if N/A present in A&B or C&D then result is N/A
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Try:

=IF(COUNTIF(A1:D1,"N/A"),"N/A",IF(OR(C1>A1,D1>B1),"Y","N"))

It works as expected. Thank you.
If incase the four numbers are not in A, B, C and D columns. first two numbers are in column A and B and second two numbers are in F and G, how can we update the above formula?
 
Last edited:
Upvote 0
Possibly:

=IF(OR(A1="N/A",B1="N/A",F1="N/A",G1="N/A"),"N/A",IF(OR(F1>A1,G1>B1),"Y","N"))

or to borrow from Rick's construction in the other thread:

=IFERROR(IF(OR(-F1<-A1,-G1<-B1),"Y","N"),"N/A")
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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