+ Reply to Thread
Results 1 to 3 of 3

Excel formula to check Sat, Sunday and Bank Holidays to Return Certain Value

  1. #1
    Registered User
    Join Date
    12-30-2015
    Location
    england
    MS-Off Ver
    2010
    Posts
    74

    Excel formula to check Sat, Sunday and Bank Holidays to Return Certain Value

    I wrote following formula;

    =IF(AND(WEEKDAY(M$1)>1,WEEKDAY(M$1)<7),IF(AND(M$1>=$H2,M$1<=$I2),IFERROR(VLOOKUP(M$1,BH!$A$2:$A$35,""),$D2/$G2),""),"")

    What I want to do in attached sheet is, if the date in cell M1 is a weekday (i.e., Monday through Friday) and if it is between the dates in cells H2 and I2. If both of these conditions are met, the function then checks if the date in cell M1 is not equal to any dates within A2:A35 (BH Tab). If it is not equal, the function returns the value in cell D2 divided by the value in cell G2.
    If the date in cell M1 is found in the range A2:A35, the function returns an empty string.
    Problem I am having is formula returns values for the dates from A2:A35 (BH TAB)
    Hope I explained clearly. Any advice please.
    Attached Files Attached Files
    Last edited by bananacitizen; 06-06-2023 at 04:18 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Excel formula to check Sat, Sunday and Bank Holidays to Return Certain Value

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied across.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Excel formula to check Sat, Sunday and Bank Holidays to Return Certain Value

    Thanks for the rep.

    Assume this resolved your issue?

+ 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] A Formula to show the current date and bank holidays
    By Archie11 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-14-2023, 02:05 PM
  2. Fix this Excel formula or add feature to avoid bank holidays
    By Greene1999 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-16-2021, 10:13 AM
  3. [SOLVED] Formula, Unique day, exclude Bank holidays
    By dude6571 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-09-2018, 07:42 AM
  4. [SOLVED] How to omit holidays and Sunday in DateDiff function
    By mohan.r1980 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-23-2017, 01:54 AM
  5. Counting business days in excel excluding bank holidays
    By SuperHoops in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-08-2013, 04:52 PM
  6. Bank Holidays when BH is day 1
    By daverat in forum Excel General
    Replies: 5
    Last Post: 04-07-2010, 09:24 AM
  7. Uk Bank Holidays
    By HDV in forum Excel General
    Replies: 1
    Last Post: 03-26-2007, 09:00 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