Forum

Notifications
Clear all

Conditional Format based on multiple criteria

6 Posts
2 Users
0 Reactions
118 Views
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
Topic starter
 

I have tried different formulas to get this to work using AND/OR but cannot seem to get it to work.

I have a file attached an example

Will wildcards work?

What if my criteria was a number such as 123 in line 3

 
Posted : 13/03/2020 8:02 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
Topic starter
 

Hi Robert,

The syntax for OR is 

=OR(Condition1, Condition2)

so something like 

=OR(A1=123, B1="xyz")

Your first OR formula is

OR($A2,A2="wa") 

But the value in $A2 is a string so this isn't really carrying out a test as I think you intend.  What value do you want to check for in $A2?

With OR($B2,B2="true")

B2="true" is saying check B2 for the text "true", but I assume you want to test for the Boolean value True.

I'm not sure what you are trying to test for.  if you can explain that I can probably rebuild the formula for you. Please provide a few examples.

Regards

Phil

 
Posted : 13/03/2020 8:04 pm
(@bobcat)
Posts: 3
Active Member
 

Let me preface this with an explanation;
I wrote a powershell script to query an Active Directory server for status of user accounts; Who, what, when, where and status etc...
"True" or "False" is just a response of the status of the account in the .csv results.

$A2 is looking for any instance of ".wa" at the end of the string.

"true" is not a boolean value

What I am trying to do is highlight any text in $A2 ending with .wa, .oa, .sa in letters in "red" that are also "true" in $B2.
I think I will need three different conditional rules for each of the above.

.wa and .oa and .sa are the type of account

 
Posted : 14/03/2020 9:49 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
Topic starter
 

Hi Robert,

The formula you need to make the text red under those conditions is:

=AND(B2=TRUE,OR(RIGHT(A2,3)=".wa",RIGHT(A2,3)=".oa",RIGHT(A2,3)=".sa"))
 
Please see attached workbook.
 
Regards
 
Phil
 
Posted : 14/03/2020 10:46 pm
(@bobcat)
Posts: 3
Active Member
 

Thank you Philip,

Would I put $A to lock the column and highlight the entire row?

 
Posted : 17/03/2020 12:29 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
Topic starter
 

Hi Robert,

yes and do the same for the B column:

=AND($B2=TRUE,OR(RIGHT($A2,3)=".wa",RIGHT($A2,3)=".oa",RIGHT($A2,3)=".sa"))

Cheers

Phil

 
Posted : 17/03/2020 7:58 pm
Share: