+ Reply to Thread
Results 1 to 14 of 14

Make A new rule for Custom Formatting

  1. #1
    Registered User
    Join Date
    04-12-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    18

    Question Make A new rule for Custom Formatting

    Hi Everyone! Happy monday?

    I am trying to format a cell based on two factors. This excel spreadsheet is trying to track deliveries and dates. I would like to highlight a cell only if the date is in the last month and if the another cell is marked "No".

    For ex. Column A has a list of dates. Column B is titled "Delivered" and Filled with Yes' and No's. A1 says 3/16/2012 and B1 says No. A1 should be highlighted. A2 also says 3/16/2012 and B2 says Yes. Even though the date is in the past it should not be highlighted.

    How do I do this? I was trying to make a rule for it, but I could not figure that one out.

    Thank you for your help.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Make A new rule for Custom Formatting

    Hi Walter,

    As a first crack, maybe this...

    =AND(MONTH(A1)<MONTH(NOW()),B1="No")
    HTH
    Regards, Jeff

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Make A new rule for Custom Formatting

    Select ALL cells that are the target of the highlighting, and use conditional formatting with a formula of

    =AND(TEXT(A2,"yyyymm")=TEXT(TODAY()-DAY(TODAY()),"yyyymm"),B2="No")

  4. #4
    Registered User
    Join Date
    04-12-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Make A new rule for Custom Formatting

    Neither of those inputs did anything. I'm not sure if this is relevant, but the data in both columns are dependent on IF formulas with a false statement of an INDEX formula.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Make A new rule for Custom Formatting

    Since we cannot see what you are seeing, is it possible to give us a workbook sample?

  6. #6
    Registered User
    Join Date
    04-12-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Make A new rule for Custom Formatting

    Quote Originally Posted by jeffreybrown View Post
    Since we cannot see what you are seeing, is it possible to give us a workbook sample?
    I am sorry Jeffrey, but my workbook contains some fairly sensitive accounting information and personal data. My boss would be furious if I did this.

    EDIT: These are the exact formulas that make up the cells I am talking about...

    G8 contains
    =IF('Sheet1'!V2567="","",INDEX('Sheet1'!A2567:AA4197,1,22))
    and returns a date such as 2/13/2012

    M8 contains
    =IF('Sheet1'!Z2567="","",INDEX('Sheet1'!A2567:AA4197,1,26))
    and returns either "Yes" or "No" without the quotes.

    I am trying to format G8 to be highlighted if M8 contains No and if the date in G8 occurs prior to this month.
    Last edited by Mr.WalterJones; 04-16-2012 at 11:21 AM.

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Make A new rule for Custom Formatting

    Can you make up a quick mock sample on the side? We are just talking about two cells, A1 and B1. I don't see the If statements causing any interference, but the sample should be as accurate as possible.

  8. #8
    Registered User
    Join Date
    04-12-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Make A new rule for Custom Formatting

    Jeff see above edit.

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Make A new rule for Custom Formatting

    Hi Walter,

    This works for me >> =AND(MONTH(G8)<MONTH(NOW()),M8="No")

    Not sure I understand your formula?

    If I'm seeing this wrong, doesn't this point to itself?

    =IF('Sheet1'!V2567="","",INDEX('Sheet1'!A2567:AA4197,1,22))
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-12-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Make A new rule for Custom Formatting

    The formula written out:

    If V2567 from Sheet1 is blank, than leave the cell blank. If not blank index row 1 column 22 from the array A2567:AA4197 from Sheet1. If it is not clear, I am working in two different sheets. However, the problem at hand is only a concern in the second sheet.

    Let me try your suggestion again...

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Make A new rule for Custom Formatting

    I understand what it is looking for but row 1 column 22 of your array is V2567. Again, maybe not seeing what you are doing, but it seems =IF(V2567="","",V2567) would do the same thing.

    You could run Evaluate Formula to see what is happening with your formula.

  12. #12
    Registered User
    Join Date
    04-12-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Make A new rule for Custom Formatting

    Quote Originally Posted by jeffreybrown View Post
    This works for me >> =AND(MONTH(G8)<MONTH(NOW()),M8="No")
    I just want to make sure you are going to conditional formatting ==> make a new rule ==> use a formula to determine which cells to format

  13. #13
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Make A new rule for Custom Formatting

    Yes, that is what I am doing.

  14. #14
    Registered User
    Join Date
    04-12-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Make A new rule for Custom Formatting

    Quote Originally Posted by jeffreybrown View Post
    I understand what it is looking for but row 1 column 22 of your array is V2567. Again, maybe not seeing what you are doing, but it seems =IF(V2567="","",V2567) would do the same thing.

    You could run Evaluate Formula to see what is happening with your formula.
    Certain cells in column v are blank. I do not want to index those cells if they are. Essentially the formula is saying leave this cell (G8) blank if column V is blank.

+ 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