ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA code for expiry date (https://www.excelbanter.com/excel-programming/401306-vba-code-expiry-date.html)

Alam

VBA code for expiry date
 
Dear All
Please any one can help me.
If My Data Like
NAME PASSPORT NO. ISSUED DATE PASSPORTEXPIRY
DATE
LOUIS HENNERY B125556 5/5/2004 5/5/2007
VICTOR H. S A125586 1/9/2005 1/9/2008

I want when I open this data file, MsgBox showing the list name of staff
their passport is near or already expired.
Thanks


Gary''s Student

VBA code for expiry date
 
Easier to use conditional formatting
If the Exp dates are in column D starting in D2, then select D2 and:

Format Condtional formattting... Formula Is:
=TODAY()+30D2
pick a good cell hi-light color

copy this format down the column. If you need more than 30 days advance
notice, just change the 30 in the formula

--
Gary''s Student - gsnu200757


"Alam" wrote:

Dear All
Please any one can help me.
If My Data Like
NAME PASSPORT NO. ISSUED DATE PASSPORTEXPIRY
DATE
LOUIS HENNERY B125556 5/5/2004 5/5/2007
VICTOR H. S A125586 1/9/2005 1/9/2008

I want when I open this data file, MsgBox showing the list name of staff
their passport is near or already expired.
Thanks


Alam

VBA code for expiry date
 
Thank you very much for your help.

"Gary''s Student" wrote:

Easier to use conditional formatting
If the Exp dates are in column D starting in D2, then select D2 and:

Format Condtional formattting... Formula Is:
=TODAY()+30D2
pick a good cell hi-light color

copy this format down the column. If you need more than 30 days advance
notice, just change the 30 in the formula

--
Gary''s Student - gsnu200757


"Alam" wrote:

Dear All
Please any one can help me.
If My Data Like
NAME PASSPORT NO. ISSUED DATE PASSPORTEXPIRY
DATE
LOUIS HENNERY B125556 5/5/2004 5/5/2007
VICTOR H. S A125586 1/9/2005 1/9/2008

I want when I open this data file, MsgBox showing the list name of staff
their passport is near or already expired.
Thanks



All times are GMT +1. The time now is 08:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com