+ Reply to Thread
Results 1 to 8 of 8

If cell D3 equals X and P3 doesnt equal 'z' highlight it

  1. #1
    Registered User
    Join Date
    12-12-2014
    Location
    Suffolk, England
    MS-Off Ver
    MS office 2010
    Posts
    6

    Red face If cell D3 equals X and P3 doesnt equal 'z' highlight it

    Hi,

    Doing some rule based checking, on Excel.
    In column D i have types of tenures ie social, leashold, affordable & in column P i have types of tenancies ie Assure, Fixed, Starter, Secure.
    Only some of the tenure types match the tenancy types.

    So i need a formula that says 'IF D3 = social, then P3 must equal Assure OR Secure, If it is not equal highlight BOTH cells in red.'

    Please see attached file for an example of the layout. Excel Forum example.xlsx

    Is this possible?

    Thanks,

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: If cell D3 equals X and P3 doesnt equal 'z' highlight it

    use conditional formatting with rule based on formula for both cells.
    and the formatting formula is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    well, I probably misunderstood when is this THEN.

    now it is highlighted for D3 = social, then P3 must equal Assure OR Secure
    if other way round so for instance red when D3 = social, and P3 different from Assure OR Secure change the conditional formatting formula to (both cells)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Kaper; 12-12-2014 at 08:10 AM. Reason: lost confidence when is this mystical "THEN"
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    12-12-2014
    Location
    Suffolk, England
    MS-Off Ver
    MS office 2010
    Posts
    6

    Re: If cell D3 equals X and P3 doesnt equal 'z' highlight it

    Quote Originally Posted by Kaper View Post
    use conditional formatting with rule based on formula for both cells.
    and the formatting formula is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    well, I probably misunderstood when is this THEN.

    now it is highlighted for D3 = social, then P3 must equal Assure OR Secure
    if other way round so for instance red when D3 = social, and P3 different from Assure OR Secure change the conditional formatting formula to (both cells)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks for your response,

    Im new to formulas and conditional formatting so not entirely sure what i am meant to do next.

    Do i create a rule under conditional formatting using the above formula?

    Thank-you for your time.

  4. #4
    Registered User
    Join Date
    12-12-2014
    Location
    Suffolk, England
    MS-Off Ver
    MS office 2010
    Posts
    6

    If cell D3 equals X and P3 doesnt equal 'z' highlight it

    Quote Originally Posted by Kaper View Post
    use conditional formatting with rule based on formula for both cells.
    and the formatting formula is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    well, I probably misunderstood when is this THEN.

    now it is highlighted for D3 = social, then P3 must equal Assure OR Secure
    if other way round so for instance red when D3 = social, and P3 different from Assure OR Secure change the conditional formatting formula to (both cells)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Oops posted that reply twice.
    Last edited by Suffolkhousing; 12-12-2014 at 08:24 AM.

  5. #5
    Registered User
    Join Date
    12-12-2014
    Location
    Suffolk, England
    MS-Off Ver
    MS office 2010
    Posts
    6

    Re: If cell D3 equals X and P3 doesnt equal 'z' highlight it

    Quote Originally Posted by Suffolkhousing View Post
    Thanks for your response,

    Im new to formulas and conditional formatting so not entirely sure what i am meant to do next.

    Do i create a rule under conditional formatting using the above formula?

    Thank-you for your time.
    Bump......

  6. #6
    Registered User
    Join Date
    12-12-2014
    Location
    Suffolk, England
    MS-Off Ver
    MS office 2010
    Posts
    6

    Re: If cell D3 equals X and P3 doesnt equal 'z' highlight it

    Quote Originally Posted by Kaper View Post
    use conditional formatting with rule based on formula for both cells.
    and the formatting formula is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    well, I probably misunderstood when is this THEN.

    now it is highlighted for D3 = social, then P3 must equal Assure OR Secure
    if other way round so for instance red when D3 = social, and P3 different from Assure OR Secure change the conditional formatting formula to (both cells)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Just tried to use the forumla and it works to an extent, however if the cell DOESNT have social in it, it will remove the information from the cell and replace it with social. It doesnt highlight it, So i know what ones have changed, but with 3000 properties i need to find a way that doesnt change the data.

    Thank-you.

  7. #7
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: If cell D3 equals X and P3 doesnt equal 'z' highlight it

    No, no, not just a formula in a cell.
    I ment:
    use conditional formatting with rule based on formula
    only rule for conditional formatting is based on custom formula.

    see for example https://support.office.com/en-us/art...-US&ad=US#bm10

    PS. HAve a look into the file I posted in my first answer - you will see that neither in D3, nor in P3 is a formula. but study the conditional formatting applied there.

  8. #8
    Registered User
    Join Date
    12-12-2014
    Location
    Suffolk, England
    MS-Off Ver
    MS office 2010
    Posts
    6

    Re: If cell D3 equals X and P3 doesnt equal 'z' highlight it

    Thanks for your help. All sorted now.

+ 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. Replies: 1
    Last Post: 11-28-2013, 02:16 AM
  2. IF cell range B2:M2 equals X then equal same as cell B1
    By tsul5693 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-14-2013, 01:36 AM
  3. [SOLVED] If Cell equals, then make another cell equal to another value
    By FatCake in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-22-2013, 01:38 PM
  4. Conditional formatting - highlight range of cells when it equals a cell
    By kingkong321 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2012, 05:13 AM
  5. If 1 cell equals another in a range than equal to a 3rd cell
    By owenandy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-22-2012, 10:00 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