+ Reply to Thread
Results 1 to 8 of 8

Put NA on week dates not in range

  1. #1
    Registered User
    Join Date
    12-06-2019
    Location
    us
    MS-Off Ver
    office 365
    Posts
    18

    Exclamation Put NA on week dates not in range

    So I am working on a project that is connected to an Access database. On button click it will retrieve everything that's in my Access table to my Excel file then it will create a table which shows which weeks each person has data in the database. If they have data for that week (week beginning is always a Monday), it will show 1 and if there's none, it will show 0. Then all 1s will be converted to Y and all 0s will be converted to N.

    However, I needed to add two columns on my data sheet (which contains a list of names of the people I am checking the above against) saying Week Start Date and Week End Date. The Week Start Date is the week date (week beginning Monday) when the person initially sent data, and the Week End Date is the week date (week beginning Monday) the person is set to send data.

    I need to revamp the below code to also check the two columns. Like the Y/N will only start on the date indicated in the Week Start Date column and will end on the date indicated in the Week End Date column. The rest of the dates will show as NA. However if the two columns are empty then it will do Y/N as usual.

    here's my code:

    Please Login or Register  to view this content.
    I also posted here in mrexcel, superuser, vbaexpress (can't post links) but not getting any answers since 6 days ago

    but not getting any answer

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Put NA on week dates not in range

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    12-06-2019
    Location
    us
    MS-Off Ver
    office 365
    Posts
    18

    Re: Put NA on week dates not in range

    Hello, please see attached
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-06-2019
    Location
    us
    MS-Off Ver
    office 365
    Posts
    18

    Re: Put NA on week dates not in range

    Anyone?

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Put NA on week dates not in range

    You didn't make it easy to figure out what you want. Here's my best guess.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-06-2019
    Location
    us
    MS-Off Ver
    office 365
    Posts
    18

    Re: Put NA on week dates not in range

    OMG you are my hero :salute:
    Thank you so much you saved my job

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,367

    Re: Put NA on week dates not in range

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Registered User
    Join Date
    12-06-2019
    Location
    us
    MS-Off Ver
    office 365
    Posts
    18

    Re: Put NA on week dates not in range

    Hmmm on second thought, how about this.. How about tagging the weeks in between start and end dates as NA including the start and end dates? So for example the start date is March 2nd and end date is April 27th, those weeks will be tagged as NA?

    PS: I got this working, thank you Alpha
    Last edited by homerl2409; 07-01-2020 at 07:14 AM.

+ 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] Count Week number from range of dates
    By nagesh.tvsr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-24-2018, 11:42 PM
  2. If statements to check range for dates within current month, week and quarterly.
    By trying-my-best in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-19-2017, 02:55 PM
  3. [SOLVED] Return value (Week number) if date is within a range of dates
    By bmunoz64 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-22-2015, 08:11 AM
  4. Replies: 2
    Last Post: 02-12-2015, 04:50 AM
  5. [SOLVED] Return date of Friday of each week from a range of dates
    By emortals in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-19-2015, 12:29 PM
  6. [SOLVED] Counting how many dates in a range fall into this week and last week
    By AneelK in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-08-2013, 09:38 AM
  7. Finding all dates in a column that are in the range today to a week from now
    By jrcream in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-01-2008, 09:32 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