Expiration date code
Closed
X-Man
-
30 Jan 2010 à 19:36
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 30 Jan 2010 à 20:20
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 30 Jan 2010 à 20:20
Related:
- Expiration date code
- Cs 1.6 code - Guide
- Tetris unlock code ✓ - Android Forum
- Ninja up code - Nokia Forum
- Www.gameloft.com unlock code - Nokia Forum
- Lava reset code ✓ - Phones, PDA & GPS Forum
1 response
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
30 Jan 2010 à 20:20
30 Jan 2010 à 20:20
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