+ Reply to Thread
Results 1 to 12 of 12

Conditional Formatting With An IF Function Displaying Colors

  1. #1
    Registered User
    Join Date
    10-22-2013
    Location
    Somewhere In America
    MS-Off Ver
    Excel 2003
    Posts
    6

    Conditional Formatting With An IF Function Displaying Colors

    Hey all,

    I've been stuck on this problem for a while now and I can't seem to figure it out. Long story short my company has received an oil analysis machine that takes samples from both engines. 1 engine type is "ME", and the other "HEP". Now I just wanted to do some simple conditional formatting but since the machine puts the HEP & ME in the same column, it's a lot trickier than I thought it would be. For example, Zinc values are drastically different on HEP than they are for ME. So continuing on the Zinc example, I was wondering if there's anyway I can do something like:

    So if Zn is located at cell D26 and the engine class (HEP or ME) is located at C26 I wanted it to lookup if C26 reads "HEP or ME"..if it's ME I want it to follow this rule:

    If D26 > 10, highlight cell in red.
    If D26 < 7, highlight cell in green.
    If D26 is 8-10, highlight in yellow

    Now if instead of ME C26 says HEP, I want it to follow a similar set of rules. Is this possible? I've tried If functions in conditonal formatting and it just isn't working. How do I do this?

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional Formatting With An IF Function Displaying Colors

    No need to type IF in CF rules. Try something like this for the first rule.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    How can you use Conditional Formating.

    --In Excel 2007 and 2010, Conditional Formatting is in the Styles group on the Home tab. In Excel 2003, Conditional Formatting is on the Format menu. See here how you can work using CF.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    10-22-2013
    Location
    Somewhere In America
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Conditional Formatting With An IF Function Displaying Colors

    I understand that, but first the cell has to look up if it's HEP or ME. If it's HEP the values are allowed to be higher than 10. Does that make sense?

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional Formatting With An IF Function Displaying Colors

    ...So if Zn is located at cell D26 and the engine class (HEP or ME) is located at C26 I wanted it to lookup if C26 reads "HEP or ME"..if it's ME I want it to follow this rule:
    In this way?

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-22-2013
    Location
    Somewhere In America
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Conditional Formatting With An IF Function Displaying Colors

    Hey man,

    I tried that just like you posted but it still doesn't work and I know it should. IF I set it to D26 > 10, by itself with no "AND" function it works. But when I type what you typed, it doesn't. I THINK it might have to do with the fact that excel is seeing the "ME" as a number and not a text, but I'm not too sure. Any idea on what I should do?

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional Formatting With An IF Function Displaying Colors

    No worries. See the example.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-22-2013
    Location
    Somewhere In America
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Conditional Formatting With An IF Function Displaying Colors

    Still not working. I'll attach a sample of what I'm copying for you to see. The example I'm talking about is C25 and AR25 in the document. Ignore everything highlighted in gray. It's on the 2nd Sheet.
    Attached Files Attached Files
    Last edited by DMVCK; 10-22-2013 at 11:25 AM.

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional Formatting With An IF Function Displaying Colors

    ok . i see what you mean! It's really strange. I'll take a look for 5 more minutes but as i am out of time, probably we'll continue tomerrow, if no one else will be able to helps you.

  9. #9
    Registered User
    Join Date
    10-22-2013
    Location
    Somewhere In America
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Conditional Formatting With An IF Function Displaying Colors

    Thanks dude! I would rep you if I could, I have to spread rep. Any help would be appreciated.

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,794

    Re: Conditional Formatting With An IF Function Displaying Colors

    The formulae in column C are bringing values across from column CU in the sheet 'Q100 data'. However, if you look at those values directly, you will see that there are several spaces after ME and HEP. It would be wise, therefore to replace the formula in C3 of the Formatted sheet to this:

    =TRIM('Q100 data'!CU1)

    As the cell is formatted as Text, you should change this to General, and then you can copy down (or use Copy | Paste Special | Formulas if you wish to retain the grey shading). Then the CF formula that Fotis suggested should work for you.

    Hope this helps.

    Pete

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional Formatting With An IF Function Displaying Colors

    Looks like to be a problem with string "me" in cd column of first sheet..... Interesting point...!

    One way around looks to work...

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I'll see your reply tomorrow morning.

    Regards!

  12. #12
    Registered User
    Join Date
    10-22-2013
    Location
    Somewhere In America
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Conditional Formatting With An IF Function Displaying Colors

    Dude, you guys are awesome. I'll try out both your methods and let you know how it goes. Repped both of you!

    Fotis, if you could explain your equation that would be greatly appreciated.

+ 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 Colors
    By FoxRacing1234 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-25-2013, 10:07 AM
  2. Conditional Formatting Adding Colors
    By chie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-17-2013, 03:31 AM
  3. Copying over conditional formatting colors
    By maks25 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-24-2011, 10:32 AM
  4. Conditional Formatting Colors
    By dmyoungsal in forum Excel General
    Replies: 3
    Last Post: 07-15-2008, 05:38 PM
  5. conditional formatting (need 10 colors)
    By dmyoungsal in forum Excel General
    Replies: 7
    Last Post: 07-15-2008, 08:58 AM

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