+ Reply to Thread
Results 1 to 18 of 18

Reuire Conditional Formatting to find Errors between columns

  1. #1
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Lightbulb Reuire Conditional Formatting to find Errors between columns

    Hi there,

    I need a means of finding errors between two (or more) columns.

    My first issue is that in Column F (titled, PREGNANT) I have 'Yes' or 'No' answers. I need to cross-examine this to Column E (titled, GENDER) where the answers are 'Female' or 'Male'. I'd like a forumla that if there is a 'Yes' in the pregnant column and 'Male' in the gender columns; the columns turn a specified colour. I hope this makes sense?

    Secondly, I then need a means of cross-examining three columns (not all adjacent to each other). I'd need to be able to compare Column AF (titled, Drug_2) with column AO (titled, Days_last_month_alcohol_consumed) and column AP (titled, Units_per_day_last_month). Here, what I'd need is for three columns to turn a specified colour if the words 'NO SECOND DRUG' appear in column AF, and a numeric value greater than 14 appears in column AO AND a numeric value greater than 8 appears in column AP. In layman's terms, I'm error checking that someone hasn't listed a client as drug free if they are drinking 14 days or more in a month, consuming more than 8 units of alcohol on those days.

    I hope someone out there can help me!!!

    Thanks in advance,
    Kelly M

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Reuire Conditional Formatting to find Errors between columns

    go to conditional formatting
    assuming your data starts from E2
    select new rule ---> select determine a formula for CF
    type =AND($E2="male",$F2="Yes") then in format section choose colour and in applies to section select E2:F500 and select apply for first condition
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    Thank you! This was a big help - could I possibly do this for the other columns that I listed in part two of my problem?? Not sure how to add in the third column etc... sorry I am very new to all this!

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Reuire Conditional Formatting to find Errors between columns

    for second condition
    select new rule ---> select determine a formula for CF
    =AND($AF2="No Second Drug",$AO2>=14,$AP2>8) then in format section choose colour and in applies to section type =$AF$2:$AF$400,$AO$2:$AP$400 and select apply for first condition

    if your days in AO2 and AP2 is >=14 or >=8 then use below version
    =AND($AF2="No Second Drug",$AO2>=14,$AP2>=8)


    if this is helpful click"*" add rep icon in the bottom left corner of my post
    Last edited by hemesh; 01-20-2014 at 08:31 AM.

  5. #5
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    Hmm it appears I'm having a problem with the formatting - it's only picking up one entry... I don't see the option to apply to section type??

  6. #6
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Reuire Conditional Formatting to find Errors between columns

    select Af2, go to conditional formatting again , see manage rules
    There you will find applies to

  7. #7
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    When I run the formatting for the pregnancy, it's only picking up one correctly... if I play around with it and select M / Pregnant the columns above are highlighted, not the ones I need??

  8. #8
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Reuire Conditional Formatting to find Errors between columns

    Hello Martin !

    find attached

    check CF---> Manage Rules-----> at the top select this worksheet
    see CF formula by selecting edit formula and check the applies to


    Or attach your book ! Go to advanced ---> select paper clip icon or select manage attachment
    Attached Files Attached Files
    Last edited by hemesh; 01-20-2014 at 08:40 AM.

  9. #9
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    You've been amazing help - absolutey!!! Thanks for everything!

  10. #10
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    Hemesh, I have an additional problem (sorry to be cheeky to ask!)

    I need to check that if in Column S someone has input "NFA", that "NFA" appears in column T as well - and if it doesn't or someone has entered something different (e.g, No Housing Problems) that this flags as a coloured cell too...

    Any thoughts?
    Thanks

  11. #11
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Reuire Conditional Formatting to find Errors between columns

    Try this Martin
    =AND($S2="NFA",$S2<>$T2) select colour & then in applies to S2:T400

  12. #12
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    Hiya,

    Sorry I don't think I made myself clear on the additional request - my fault...

    If someone inputs 'NFA' in column S - the ONLY appropriate/legal answer for Column T is 'NFA'.

    For example, if in S2 I have ''NFA'' and in T2 I have ''NFA'' - the columns shouldn't change colour
    But if I have ''NFA'' in S2 and ''Supported Housing'' in T2 it should change to the desired colour.

  13. #13
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Reuire Conditional Formatting to find Errors between columns

    its working in my sheet

  14. #14
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    hmmm ... Let me have another go - it was highlighting both columns if they had NFA in each (which I don't need), but it's probably my user error!

  15. #15
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    This isn't working for me for some reason :/

  16. #16
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Reuire Conditional Formatting to find Errors between columns

    attach your book ! Go to advanced ---> select paper clip icon or select manage attachment

  17. #17
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    Heya,

    I tried just before you responded - but as I am at work, we are blocked to uploading things to the internet (harsh internet restrictions)

    Is there any other way I could get the file to you?

    Thanks,

  18. #18
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Reuire Conditional Formatting to find Errors between columns

    I've gotten it to work, but it highlights everything with NFA in either column S or T.

    Basically, the columns need to be highlighted if there is NFA in column S and either 'Hostel', 'Living with parents', Owned Property', 'Rented', 'Supported Housing' or 'Temporary' in column T.

    Having NFA in both columns is a valid combination and therefore doesn't need to be highlighted.

    I can work around this by layering rules for each label (Hostel, Living with parents etc) but I'm thinking there must be an easier way?

    Sorry to be such a noob!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Conditional Formatting: Find When Values in 3 Columns Are Repeated in Rows
    By snapfade in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-26-2013, 09:39 PM
  2. [SOLVED] Conditional Formatting to Find Duplicats Bewteen Two Columns of Data
    By garrett.grillo in forum Excel General
    Replies: 2
    Last Post: 09-28-2012, 02:05 AM
  3. Conditional Formatting and Errors
    By Jonathan78 in forum Excel General
    Replies: 5
    Last Post: 05-29-2010, 01:40 PM
  4. Conditional Formatting w/ errors
    By nesthead98 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2009, 03:56 PM
  5. Conditional Formatting for errors
    By Zyphon in forum Excel General
    Replies: 3
    Last Post: 09-25-2007, 05:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1