+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Conditional Formatting formula

  1. #1
    Registered User
    Join Date
    07-06-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Conditional Formatting formula

    What I have is a dataset that is organzied by year and then by quarter within each year.
    [ 2011 ]
    [1][2][3][4]

    I also have data that has a "launch year" "launch quarter" "out year" and "out quarter" (as in out of production)

    To conditionally format it I've alredy got the formula to determine where to highlight the years but I'm having trouble then erasing or adding to the fill depending on the quarter data.

    Here's what I've got so far.
    =AND($A7<=G$3,OR($C7>=G$3,$C7=0))
    A7 is the launch year
    C7 is the out year

    G3 is the year header as shown above (2011, 2012, etc.)

    B7 is the launch quarter
    D7 is the out quarter

    Any help with the quarter thing is MUCH appreciated!!!!
    Last edited by FortuneKid; 07-06-2011 at 03:09 PM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Conditional Formatting formula

    Hi and welcome to the board

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  3. #3
    Registered User
    Join Date
    07-06-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Conditional Formatting formula

    Here's a dummy book of the problem.

    THANKS!!!!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Conditional Formatting formula

    Does this help ? ( see attached)

    You could dispense with row 4 and replace the G4 reference with left(g4,1) in the formula for CF
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-06-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Conditional Formatting formula

    That seemed to work for the right out year/quarter side but look how Q1 is still marked even though it doesn't begin until Q2 in 2011.

    We're very close though, I didn't think about the "&" function.

    also I originally tried using the LEFT thing but for some reason when I'd test it with a basic equation like LEFT(G4,1)<8 it wouldn't yeild a correct answer as if it wasn't really seeing the number or something.
    Last edited by FortuneKid; 07-07-2011 at 08:12 AM.
    Always DTL (down to learn)

  6. #6
    Registered User
    Join Date
    07-06-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Conditional Formatting formula

    Ahhhh! Thank you aurthorB, you laid the groundwork and I was able to figure it out using your & suggestion!!!!

    Final formula for the formatting: =AND($A7&$B7<=G$3&G$4,OR($C7&$D7>=G$3&G$4,$C7=0))

    Brilliant!!!

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Conditional Formatting formula

    Your post does not comply with Rule 9 of our Forum RULES. If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit. And please never edit a thread in which someone else has responded.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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