• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

highlight in yellow if within same month

shili12

Member
i want to highlight values in column I in yellow along with values in column Q,R,S,T,U if they fall within the same month.
Power query, conditional formatting solutions are ok too.
sample worksheet is attached too.

1712482661626.png
 

Attachments

  • highlighyellow.xlsx
    22.1 KB · Views: 4
CF rule for I2:

=AND($I2<>"",MONTH(I2)=MONTH($I2),YEAR(I2)=YEAR($I2))

Applies to: =$I$2:$I$2000,$Q$2:$U$2000
 

Attachments

  • CHANDOO highlighyellow AliGW.xlsx
    22.5 KB · Views: 3
office 365, the other data was retrieved using FILTER, observed your worksheet, on issuance dates its highlighting all cells, instead of leaving them void of colour. Maybe i can filter them out like this, its our person who issued certificate from main portal in feb 2024 but we cant see settlement for the same in statement. however there is possibility of typo errors and account indicated as agents name, too.

1712484266793.png
 
Last edited:
i tried a VBA solution via copilot, am not sure if its a good idea to post it here, maybe i breach forum rules, let me know, anyway i got the opposite effect !!

1712485594742.png
 
Conditional formatting in the attached:

1712493089964.png

1712493175512.png


Edit, taking a leaf from @AliGW the CF formula for Q2:U22 could be a little simpler:
=AND($I2<>"",MONTH($I2)=MONTH(Q2),YEAR($I2)=YEAR(Q2))
 

Attachments

  • Chandoo56602highlighyellow.xlsx
    22.5 KB · Views: 5
Last edited:
Did you look at the solution I offered you at all? Your subsequent posts suggest not.
 
According to the initial post attachment without any CF a VBA demonstration to paste only to the worksheet module :​
Code:
Sub Demo1()
  Const F = "IF(ISNUMBER(Q#:U#),IF(MONTH(Q#:U#)=MONTH(I#),ADDRESS(#,COLUMN(Q#:U#))))"
    Dim L&, R&, V
        L = UsedRange.Rows.Count
        Application.ScreenUpdating = False
        Range("I2:I" & L & ",Q2:U" & L).Interior.ColorIndex = xlNone
    For R = 2 To L
        V = Filter(Evaluate(Replace(F, "#", R)), False, False)
        If UBound(V) > -1 Then Range("I" & R & "," & Join(V, ",")).Interior.ColorIndex = 35
    Next
        Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom right Like !​
 
Did you look at the solution I offered you at all? Your subsequent posts suggest not.
yes, i did, i tried it out and even sent you a screenshot of how i would circumvent, as colour was reflected in all cells, none excepting. see #4
I even carefully saved the file, as its bound to save me hours and hours of work thru visual checking, which may not be possible with larger files.
 
Thanks to @Marc L , i just made a slight modification for colour =6.
I am indeed grateful
 

Attachments

  • highlighyellow (1).xlsb
    18.9 KB · Views: 4
Back
Top