+ Reply to Thread
Results 1 to 8 of 8

check if todays date is bank holiday

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    check if todays date is bank holiday

    Hi All

    Please attached the workbook. In this Column B contains all the bank holidays. i want to write VBA code that will check if todays date is present in column B then display message "Bank Holiday" .

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: check if todays date is bank holiday

    This will return TRUE if today is holiday
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: check if todays date is bank holiday

    Zbor, I need to write VBA code for this.

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: check if todays date is bank holiday

    Please Login or Register  to view this content.
    Last edited by walruseggman; 10-08-2014 at 11:16 AM.

  5. #5
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: check if todays date is bank holiday

    Thanks but can you have a look at the following code. After date1 < date 2 condition statement, I want to check if date2 is a bank holiday and if the answer is Yes then move the control to rs.moveprevious statement in green font below.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: check if todays date is bank holiday

    Try:

    Please Login or Register  to view this content.
    Not sure what your rs. is, but GoTo is the syntax you want to use to go to a specific line. Also, the line you are going to needs a colon at the end of it.

  7. #7
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: check if todays date is bank holiday

    I tried it but didn't work. Can anyone please help me how to use Goto statement. Thanks

  8. #8
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Re: check if todays date is bank holiday

    STill stuck in the same problem . if its a bank holiday then move focus to rs.moveprevious line and skip all the steps before this line.

    hope anyone can help me in this.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] IF function using WORKDAYS and a Bank Holiday list - trying to add new holiday dates
    By jowarks in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-05-2013, 05:42 AM
  2. Check if date > todays month
    By samz91 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-28-2012, 07:42 PM
  3. holiday calculation around bank holidays
    By y0rk1e72 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-19-2012, 06:55 AM
  4. Code to check if a cell has todays date
    By virencm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2011, 04:55 PM
  5. Check two dates against todays date?
    By oleisbest in forum Excel General
    Replies: 12
    Last Post: 04-22-2010, 07:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1