+ Reply to Thread
Results 1 to 3 of 3

Do While Loops with the conditions being time and date

  1. #1
    Registered User
    Join Date
    04-07-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2010
    Posts
    1

    Do While Loops with the conditions being time and date

    Hi Guys,
    Well, I am kind very new to VBA so the code I have is very inefficient. I am trying to use VBA to create a table documenting the number of entries I have given a certain date and time. More specifically, I am trying to find the number of entries I have for each day starting with the end of business (5:00 pm) the previous business day to the end of business on the current day. I attached an example of my code and raw data for the first week of January 2013. What I need is a much more efficient way of doing what I am trying to do.

    Thanks!
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by newskooldemz; 04-07-2013 at 07:14 AM. Reason: Forgot to add attachment

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Do While Loops with the conditions being time and date

    Hi
    Would it be possible for you to upload a copy of the file so we can get a clearer understanding?.. It will speed up the process and is more likely to achieve the best possible solution.
    Just be mindful of the fact that you're not supposed to upload sensitive or secret information

    1. Select Edit Message or Reply
    2. Select "Go Advanced" at the bottom right of the message area
    3. Select the paper clip on the menu bar
    4. Flow the wizard instructions for uploading a file.
    Elegant Simplicity............. Not Always

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Do While Loops with the conditions being time and date

    Hi, newskooldemz,

    a lot of code - I´d go with one that is a little bit more compressed

    Please use a copy of your original file. I cleared the contents in Sheet2 and then ran the following code I put into a standard module (not behind Sheet1):
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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