• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Conditional Format based on multiple criteria|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Conditional Format based on multiple criteria|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Conditional Format based on multipl…
sp_PrintTopic sp_TopicIcon
Conditional Format based on multiple criteria
Avatar
Robert Prather

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
February 22, 2012
sp_UserOfflineSmall Offline
1
March 13, 2020 - 10:02 am
sp_Permalink sp_Print

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

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1550
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
March 13, 2020 - 10:04 am
sp_Permalink sp_Print

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

Avatar
Robert Prather

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
February 22, 2012
sp_UserOfflineSmall Offline
3
March 13, 2020 - 11:49 pm
sp_Permalink sp_Print

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

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1550
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
4
March 14, 2020 - 12:46 pm
sp_Permalink sp_Print

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
Avatar
Robert Prather

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
February 22, 2012
sp_UserOfflineSmall Offline
5
March 17, 2020 - 2:29 am
sp_Permalink sp_Print

Thank you Philip,

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

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1550
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
6
March 17, 2020 - 9:58 am
sp_Permalink sp_Print

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

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Edson Lima, Peter Venkatrao, Ted Eggleston, Ronald White
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
Hans Hallebeek: 185
Newest Members:
thong nguyen
Appiagyei Kofi Frimpong
Hilary Burchfield
Richie Wright
Adel Kock
Barbara Murray
Doug Milne
Siobhan Stringer
Rob Rooth
Tom Lewis
Forum Stats:
Groups: 3
Forums: 24
Topics: 6542
Posts: 28644

 

Member Stats:
Guest Posters: 49
Members: 32830
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate
  • Sponsor Our Newsletter

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.