+ Reply to Thread
Results 1 to 19 of 19

Error after date: 10-10-2021

  1. #1
    Registered User
    Join Date
    10-25-2021
    Location
    Winterswijk
    MS-Off Ver
    365
    Posts
    4

    Error after date: 10-10-2021

    Hello,

    I wrote and starting using the code at the start of 2021. Somewere around 2-2021. It worked perfect until two weeks ago. I think it has something to do with the date value, for it does not work after 09-10-2021.
    the code works as follows:
    I enter a date in B3 sheet AFVAL_TOT. In sheet AFVAL_DATA is a list ranging from 1-1-2021 to 31-12-2021. when i press the button (which starts the code) it will take the values from worksheet AFVAL_TOT and copy it to worksheet AFVAL_DATA in the list with dates behind the date thats corresponds with the date from B3.

    Please Login or Register  to view this content.
    Last edited by Richard Buttrey; 10-25-2021 at 06:38 AM.

  2. #2
    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,780

    Re: Error after date: 10-10-2021

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new here I have done it for you this time.)

    There is no 360 version of Excel - you have 365. Update your forum profile, please. Thanks.
    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.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Error after date: 10-10-2021

    Hello and welcome

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Error after date: 10-10-2021

    Following Ali's note, although you had added code tags the layout of the underlying code was not indented.

    It's always advised to do this to make code easier to read.

  5. #5
    Registered User
    Join Date
    10-25-2021
    Location
    Winterswijk
    MS-Off Ver
    365
    Posts
    4

    Re: Error after date: 10-10-2021

    Hello,

    I added the Excel file.
    Attached Files Attached Files

  6. #6
    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,780

    Re: Error after date: 10-10-2021

    Following Ali's note, although you had added code tags the layout of the underlying code was not indented.
    Your edit has made no difference, Richard: I had added the code tags. The OP did not, and that's why I posted the admin note and amended his/her opening post.

    @ m gruwel

    PLEASE update your forum profile to MS365 - 360 is not correct(that's degrees in a circle, not days in a year).

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Error after date: 10-10-2021

    For the avoidance of doubt I didn't edit anything. Once I opened the post and saw there were no indenting characters in the original I simply pressed save rather than just back out.

  8. #8
    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,780

    Re: Error after date: 10-10-2021

    Ah, OK - that makes sense. However, by saving, you have date-stamped the post as having been amended by you. You can just cancel the edit to avoid this happening.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Error after date: 10-10-2021

    Seems to work OK for me.

    Of course the date 01/01/2022 in D285 is not consistent with the other dates in column D, hence if your question is why doesn't 11/10/2021 in D3 work that's because there is no such date in the Data sheet.

  10. #10
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Error after date: 10-10-2021

    What exactly is the error I can see 11/10/2021 produces an error as this date is not in your data sheet so is not found d286 is 01/01/2021 where you might expect this value, but other dates seem to work

  11. #11
    Registered User
    Join Date
    10-25-2021
    Location
    Winterswijk
    MS-Off Ver
    365
    Posts
    4

    Re: Error after date: 10-10-2021

    well, i think i forgot the change the date back to 01/01/2021. I changed it while error solving. I forgot to change it back. but is does not solve the problem. the dates 10-10-2021 till 31-12-2021 seems to be the problem. The dates 1-1-2021 till 9-10-2021 seem to work fine. I added the Excel file with the right date.
    Attached Files Attached Files
    Last edited by m gruwel; 10-25-2021 at 07:50 AM.

  12. #12
    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,780

    Re: Error after date: 10-10-2021

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new, I will do it for you today: https://www.mrexcel.com/board/thread...-2021.1185674/)

    TWO rules broken already - time to read the rules: https://www.excelforum.com/forum-rul...rum-rules.html

  13. #13
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Error after date: 10-10-2021

    @m gruwel

    It is obvious that you have not bothered to read the forum rules you agreed to when you joined this forum. Please do so now and abide by them in the future.

    crossposted: https://www.mrexcel.com/board/thread...-2021.1185674/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  14. #14
    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,780

    Re: Error after date: 10-10-2021

    You have asked for this thread to be closed so you can start another on the same issue. Sorry, this will not happen.

    Continue here, please. Thanks.

  15. #15
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Error after date: 10-10-2021

    Dates later than 10/10/2021 work fine for me.

    Please restate your problem.

  16. #16
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Error after date: 10-10-2021

    I also see that it doesn't find dates very well, (I hate Excel and dates)

    Try modifying to:

    Please Login or Register  to view this content.
    Last edited by Arkadi; 10-25-2021 at 03:16 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  17. #17
    Registered User
    Join Date
    10-25-2021
    Location
    Winterswijk
    MS-Off Ver
    365
    Posts
    4

    Re: Error after date: 10-10-2021

    Well this seems to solve the problem. Thank you very much.

  18. #18
    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,780

    Re: Error after date: 10-10-2021

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  19. #19
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Error after date: 10-10-2021

    Thanks Ali for reminding about the thanks option, and more importantly the mark as complete

    I've edited this to remove negativity.
    Last edited by Arkadi; 10-27-2021 at 02:15 PM.

+ 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. Call in the Cavalry - 2021
    By AliGW in forum The Water Cooler
    Replies: 59
    Last Post: 01-07-2022, 12:58 PM
  2. [SOLVED] Is date not spotting 31/09/2021 is there another method
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2021, 06:22 AM
  3. How to use Regexmatch to filter ranges of Times & Dates (ie, 2021-01-05 08:00 - 2021-01-06
    By rddt in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 9
    Last Post: 01-10-2021, 05:01 PM
  4. Replies: 1
    Last Post: 01-10-2021, 04:32 AM
  5. Hello 2021
    By clixkers in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-09-2021, 03:25 AM
  6. [SOLVED] Request for a macro insert name of the day in adjacent column to date in edairy 2021
    By buvanamali in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-25-2020, 07:38 PM
  7. [SOLVED] Formulating 1/1/2021-1/2/2021, 1/3/2021-1/9/2021 etc through one row.
    By jbposey86 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-24-2020, 08:27 PM

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