+ Reply to Thread
Results 1 to 3 of 3

Excel VBA code to return weekday name from a date then autofilters for userdefined weekday

  1. #1
    Registered User
    Join Date
    11-26-2012
    Location
    jamaica
    MS-Off Ver
    Excel 2010
    Posts
    3

    Excel VBA code to return weekday name from a date then autofilters for userdefined weekday

    I spent last night looking for an answer to my question but i didn't find anything specific to my ask.

    I have a huge sheet that contains lots of data. In Column A, I have the Date and time. I would like to have a VBA code that does few actions.

    1) Insert a column B next to column A that gives the weekday name. For example if the date in column A is January 10, 2016 8:30 then column B will have "Sunday"

    2) Then the VBA code to filter this sheet based on Column B. For instance given a user input of a particular day (example Friday), the autofilter will filter for 4 days ahead ( Friday, Saturday, Sunday, Monday ).

    3) The result of the autofilter then is copied to new blank sheet.

    4) In the new sheet I want the vba to delete any row data for the same user defined day ( example Friday ) that has time of less than user defined time (example 8:00 am) in Column A. Finally shifting cells up to remove any blank rows.

    Hope I am not overwhelming you with this problem, but I hope I get feedback from one of the brilliant minds in here

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Excel VBA code to return weekday name from a date then autofilters for userdefined wee

    please send an excel file with dummy data and the exepected results

  3. #3
    Registered User
    Join Date
    11-26-2012
    Location
    jamaica
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Excel VBA code to return weekday name from a date then autofilters for userdefined wee

    here is the sample
    Attached Files Attached Files

+ 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] Calculate weekday end date based on sum of weekday start date and cell value
    By Rerock in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2014, 09:17 AM
  2. [SOLVED] If Weekday() = vbSaturday Or Weekday() = vbSunday Then
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2014, 09:48 AM
  3. [SOLVED] vba code to open excel file name in previous weekday date
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2014, 05:09 PM
  4. [SOLVED] Return Future Weekday
    By sports_fan in forum Excel General
    Replies: 6
    Last Post: 01-10-2013, 01:08 AM
  5. Return date for the next coming weekday
    By ElmerS in forum Excel General
    Replies: 7
    Last Post: 05-24-2010, 12:51 PM
  6. Add a number to date and return a weekday
    By dwain in forum Excel General
    Replies: 3
    Last Post: 10-13-2008, 10:55 AM
  7. Excel Date Sort Format: Weekday, Month Day, Year
    By mrsinnister in forum Excel General
    Replies: 2
    Last Post: 03-23-2006, 04:15 PM

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