Expiration date code
Closed
                                    
                        X-Man                    
                                    -
                            Jan 30, 2010 at 07:36 PM
                        
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 30, 2010 at 08:20 PM
        venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 30, 2010 at 08:20 PM
        Related:         
- Expiration date code
- Cs 1.6 code - Guide
- Samsung volume increase code - Guide
- Battery reset code - Guide
- Nokia 105 games unlock code free ✓ - Nokia Forum
- Ninja up code ✓ - Android Forum
1 response
                
        
                    venkat1926
    
        
                    Posts
            
                
            1863
                
                            Registration date
            Sunday June 14, 2009
                            Status
            Contributor
                            Last seen
            August  7, 2021
            
            
                    811
    
    
                    
Jan 30, 2010 at 08:20 PM
    Jan 30, 2010 at 08:20 PM
                        
                    you have mentioned in A1 and B2 perhaps this is typo. it should be A2 and B2
you have entered date as march 08 and march 10 perhaps dates are not important
you also perhaps mean that month of expiration date minus month of today is less than or equal to 3 months then that expiration date should be marked red. for e.g. march 10 and now Jan 10 less than 3 months so red.
If you are familiar with macro I am giving a macro here.
If you dates are important this macro will give you wrong coloring
            you have entered date as march 08 and march 10 perhaps dates are not important
you also perhaps mean that month of expiration date minus month of today is less than or equal to 3 months then that expiration date should be marked red. for e.g. march 10 and now Jan 10 less than 3 months so red.
If you are familiar with macro I am giving a macro here.
If you dates are important this macro will give you wrong coloring
Sub test()
Dim r As Range, c As Range, j As Object
Worksheets("sheet1").Activate
ActiveSheet.Cells.Interior.ColorIndex = xlNone
Set r = Range(Range("B2"), Range("B2").End(xlDown))
For Each c In r
If Month(c) - Month(Date) <= 3 Then
c.Interior.ColorIndex = 3
GoTo line1
End If
If Month(c) - Month(Date) > 3 And Month(c) - Month(Date) <= 6 Then c.Interior.ColorIndex = 6
line1:
Next c
End Sub
                
                