+ Reply to Thread
Results 1 to 6 of 6

VBA Code to check if entry exists in a range for each date in a date range

  1. #1
    Registered User
    Join Date
    08-31-2019
    Location
    Bangalore
    MS-Off Ver
    O365
    Posts
    27

    VBA Code to check if entry exists in a range for each date in a date range

    I need VBA code to check if entry exists in a range for a value against each weekday in a date range

    If the value to be searched is in C4 and the date range is in B7 & B9 of workbook A, It should check the range A:E in 'Tracker' worksheet in workbook B (in which the value being searched is in column A and individual dates are in column E), if any of the weekday values in the date range exists in the range A:E then it should return a msgbox.

    i.e. if the value in C4 is X and the date range in B7 & B9 is 3/1/2022 & 3/10/2022 it should all 'X' entries in the column A of the range A:E in workbook B and check if corresponding entries for each weekday exists in column E, if it finds even one match it should return a msgbox and exit sub

    I've attached samples of the workbooks.
    Attached Files Attached Files
    Last edited by tariqfaiyaz; 02-28-2022 at 10:11 AM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,316

    Re: VBA Code to check if entry exists in a range for each date in a date range

    Your Sheet1 in A.xlsm is throwing a run time error when compiling, indicating it is corrupted in some way. Suggest you recreate and simplify it.

  3. #3
    Registered User
    Join Date
    08-31-2019
    Location
    Bangalore
    MS-Off Ver
    O365
    Posts
    27

    Re: VBA Code to check if entry exists in a range for each date in a date range

    I've uploaded a new copy of the file

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,316

    Re: VBA Code to check if entry exists in a range for each date in a date range

    Possibly...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-31-2019
    Location
    Bangalore
    MS-Off Ver
    O365
    Posts
    27

    Re: VBA Code to check if entry exists in a range for each date in a date range

    Thanks, this works great !!!!

  6. #6
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,316

    Re: VBA Code to check if entry exists in a range for each date in a date range

    Glad I could help.

+ 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. Replies: 7
    Last Post: 07-14-2017, 12:04 PM
  2. Check a date range and return value based on the date range
    By KeithCar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-13-2015, 12:55 PM
  3. [SOLVED] checking if a date/date range already exists in 4 other date storing tables
    By adamstarr12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2014, 06:01 PM
  4. Check if cell value exists in row and if date in row equals date in column
    By rskay14 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2014, 02:51 AM
  5. Check if date exists in Named Range "Holiday_List"
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 02:33 PM
  6. Modifying Existing Code to Check if the entry exists
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2010, 10:39 AM

Tags for this Thread

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