Column G from row 2 contains dates. How can I correct this conditional format to work:…
- User
Column G from row 2 contains dates. How can I correct this conditional format to work: =AND(G1<TODAY())
- Assistant
It looks like you're trying to set up a conditional formatting rule in Excel to highlight dates in column G that are not blank and are earlier than today. However, you have used
G1in your formula while your dates start from row 2. If you're applying this conditional formatting starting from row 2, you should adjust the formula accordingly.Here's the corrected formula:
=AND($G2<>"",$G2<TODAY())Steps to Apply the Conditional Format:
- Select the range in column G starting from G2 (e.g., G2:G100 or just click on G2 and then drag down as needed).
- Go to the Home tab in the Ribbon.
- Click on Conditional Formatting.
- Choose New Rule.
- Select Use a formula to determine which cells to format.
- Enter the corrected formula:
=AND($G2<>"",$G2<TODAY()). - Click on the Format button to choose your formatting options (like font color, fill color, etc.).
- Click OK, and then OK again to apply the rule.
- User
conditiona format is not working
- Assistant
- User
The date in G2 is 04/10/24 and the date today is 09/10/24. But the formula is giving me FALSE
- Assistant
- User
in the helper column, =G2<TODAY() is still giving me a FALSE
- Assistant
- User
can you please write a formula like: If G2 <> "" then convert G2 value to a DAte with the fomat dd/mm/yy
- Assistant
Certainly! If you want to convert the value in cell G2 to a date format (specifically
dd/mm/yy) if it's not empty, you can use the following formula in another cell (like H2):=IF(G2<>"", TEXT(DATEVALUE(G2), "dd/mm/yy"), "")Explanation:
- IF(G2<>"", ...): Checks if G2 is not empty.
- DATEVALUE(G2): Converts the value in G2 to a date serial number if it's in a recognized date format. This part may not work if G2 is formatted as text and not a recognizable date.
- TEXT(..., "dd/mm/yy"): Formats the date as
dd/mm/yy. - If G2 is empty, it returns an empty string
"".
Important Note:
- The above formula assumes that G2 contains a recognizable date text to be converted by . If G2 contains the date in a format that Excel does not recognize, will return an error. Make sure G2 is in an acceptable format like for .
- User
- Assistant