logo elektroda
logo elektroda
X
logo elektroda

Excel - coloring a cell if a given condition is met - wa formatting

Nikopol26 43620 6
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 12804295
    Nikopol26
    Level 2  
    Hello, I have such a problem with excel 2007.
    I have a table:
    -------------------------------------------------- ---------------------------
    | A | B | C | D | E | F | G | H |
    -------------------------------------------------- ---------------------------
    1 | Invoice no. | Amount | Issued date FV | Date of issue FV | Due Date | Today | Formula | Corrective FV No. |
    -------------------------------------------------- ----------------------------
    2 | FV20130520 | 1900 | 16-8-2013 | 2013-08-16 | 80 | 2013-10-03 | OK / WRONG | 2013-11-04 |
    -------------------------------------------------- ----------------------------
    I don't know if it can be seen properly, but nevertheless I added the file as an attachment.

    I do not know how to do, so that if the date is equal to or exceeds by 80 (cell E2) days, today's date from cell I2 (correcting FV No.), then cell A2 (where is the invoice number, e.g. FV20130034) appears a red background (with the FV no.),
    and when the date is not equal to or does not exceed these 80 days, the background has changed its color, e.g. to green, also using the FV number.
    It is best if the G3 cell should change the value OK - when it does not exceed 80 days, and WRONG - when it exceeds.
    Do you know any way with conditional formatting?
  • ADVERTISEMENT
  • Helpful post
    #2 12804317
    yogi009
    Level 43  
    In conditional formatting, use something like this string:

    if today> = inscribed_date +80 then color it red

    Separately, in some column (let's assume that it is cell G4) you enter the normal condition:

    if today> = date entered then G4 = "WRONG" otherwise G4 = "OK"

    It is enough to substitute it for the function, I deliberately leave you a bit of my own work, if you learn the details once, you will remember it for longer than if you were given a lazy ready :-) Best regards.
  • ADVERTISEMENT
  • #3 12804495
    Nikopol26
    Level 2  
    As far as I understood correctly, I did it like this about "WRONG" and "OK":
    on dates:

    red_background | 2012-07-07 | 80 | 2013-10-03 | WRONG | 2012-09-25
    red_background | 2013-10-03 | 80 | 2013-10-03 | WRONG | 2013-12-22
    red_background | 2013-11-05 | 80 | 2013-10-03 | OK | 2014-01-24
    in cell G4 I entered the function:
    = IF (F4> = D4, "WRONG", "OK")
    I think it's good for even and greater than 80 days.

    However, when it comes to coloring, I don't know if I typed the formula correctly
    in conditional formatting-> New formula-> Use formula to specify cells to format -> = $ F4> = 80.
    There is a red background, but I have one more question:
    How do I know if an invoice is paid or not?
  • #4 12804923
    yogi009
    Level 43  
    Do you have the "Paid" field at all? Enter such a field, it can be of a date or logical type, if you do not need to keep information about the date of receipt of payment for the invoice and you can immediately filter the paid / unpaid invoice. You can also enter two fields: the date of payment and the logical "paid" - automatically assuming the value "true" if a date is entered in the payment date field (if this field is not empty). In fact, you can insert more of these logical fields, eg "overdue", "over 14 days past", etc. - this is as needed. Then a simple autofilter and you have a quick overview of the situation.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #6 13508820
    JRV
    VBA, Excel specialist
    Hello
    Logical is used in formulas in columns AK, AL not "0" as text, instead of 0 as a number

    Added after 2 [minutes]:

    Then it will be displayed correctly
  • #7 13508935
    maxwoj81
    Level 10  
    Hello, thanks for your help, the logic of thinking was ok. At one attempt, the logical sequence turned out to be correct and works almost as it should, there is only a problem with displaying 0 times are highlighted and sometimes not But the formula if (a1

Topic summary

The discussion revolves around using conditional formatting in Excel 2007 to color a cell based on specific date conditions. The user seeks to highlight the invoice number in red if the due date exceeds today's date by 80 days. Responses suggest using a formula in conditional formatting to achieve this, such as checking if today's date is greater than or equal to the due date plus 80 days. Additionally, users discuss implementing a "Paid" field to track invoice payment status and suggest logical fields for better data management. There are also mentions of issues with formula logic and display inconsistencies in conditional formatting.
Summary generated by the language model.
ADVERTISEMENT