Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate expiry date Justina New Users to Excel 6 August 19th 11 07:20 PM
Expiry Date calculation Arup C[_2_] Excel Discussion (Misc queries) 3 December 13th 07 02:22 PM
VBA For Expiry date Alam Excel Discussion (Misc queries) 1 November 18th 07 11:36 AM
Expiry date Martina Excel Worksheet Functions 6 February 11th 07 09:57 PM
Date Expiry function Aleks Excel Discussion (Misc queries) 6 December 18th 06 07:59 PM


All times are GMT +1. The time now is 11:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"