IF AND OR structure

poikl

Active Member
Joined
Jun 8, 2002
Messages
466
Platform
  1. Windows
Hi, I hope you can please reply. I'm trying to make a formula in Row2 ColO, to find if the right most character in ColG is T and if A2 either equals A1 or equals A3 and that G2 doesn't equal G2 or G3 (the respective Row which A2 DOES equal) then in ColO it should show G2, otherwise leave blank.
My big problem is how to avoid getting a "blank" result in ColG when for instance A2 equals A1 and G2 also equals G1 but does NOT equal G3?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Sounds to me what you want is G2 doesn't equal G1 AND G3.
 
Upvote 0
I'm only interested to know and need the formula structure the G2 comparison to G1 and or G3 ONLY if two other conditions are met: 1) A2 equals either A1 or A3 and 2) Right most character of G2 = "T"
 
Upvote 0
Might need a rethink here.....

G2 doesn't equal G2 or G3 ????
 
Upvote 0
Maybe....but UNTESTED

VBA Code:
=IF(AND(OR(A2=A1,A2=A3),RIGHT(G2,1)="T"),IF(OR(G2=G1,G2=G3),G2,""))
 
Upvote 0
Hi Micheal, Thank you for your formula,... but it shows result as "FALSE" down most of the copied and pasted column (ColO),....except in the few cells where the criteria should match, There it shows BLANK.
So if you can just please fine-tune it, then it might work
 
Upvote 0
Sorry.....quotes in the wrong place

VBA Code:
=IF(AND(OR(A2=A1,A2=A3),RIGHT(G2,1)="T"),IF(OR(G2=G1,G2=G3),G2),"")
 
Upvote 0
Thank You Micheal again. It so much better but it shows now "FALSE" in ColO (when criteria seems to have been met), instead of contents in ColG.
 
Upvote 0
Does this formula work?

=IF(AND(RIGHT(G2,1)="T", OR(A2=A1, A2=A3),G2<>G1,G2<>G3),G2,"")
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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