+ Reply to Thread
Results 1 to 5 of 5

I need a VBA code to sort data, after putting a start date in T4 and a final date in U4?

  1. #1
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    I need a VBA code to sort data, after putting a start date in T4 and a final date in U4?

    From B4:R400 i have a range of values, every row B:R is related to a specific date in D, for example B4:R4 is related to date D4. I need a VBA code to sort data, after putting a start date in T4 and a final date in U4, the code must identify those dates in collumn D and their related cells and then clean everything else, from B4:R400?

    For example:

    B4=993 C4=CAR D4=04/01/2019 E4=YESTERDAY F4=TOO ...

    B5=6 C5=BIKE D5=05/01/2019 E5=NOW F5=AGAIN ...

    B6=7 C6=BOAT D6=06/01/2019 E6=TOMOROW F6=AGAIN...

    B7=98 C7=TRUCK D7=07/01/2019 E7=NOW F7=REALITY ...

    B8=1 C8=SPACESHIP D8=08/01/2019 E8=YESTERDAY F8=TOO ...

    B9=4 C9=MACHINE D9=09/01/2019 E9=NOW F9=AGAIN ...


    Start date T4=06/01/2019 U4= 08/01/2019


    B6=7 C6=BOAT D6=06/01/2019 E6=TOMOROW F6=AGAIN...

    B7=98 C7=TRUCK D7=07/01/2019 E7=NOW F7=REALITY ...

    B8=1 C8=SPACESHIP D8=08/01/2019 E8=YESTERDAY F8=TOO ...


    The other data was cleared, only B6:F8 remained. Only the cells content must be cleared.

  2. #2
    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: I need a VBA code to sort data, after putting a start date in T4 and a final date in

    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.

  3. #3
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: I need a VBA code to sort data, after putting a start date in T4 and a final date in

    I attached a workbook with an example.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: I need a VBA code to sort data, after putting a start date in T4 and a final date in

    Hello Richard , Like you asked i attached a workbook with an example.

    Is it possible to achieve that solution with VBA?

    Thanks

  5. #5
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: I need a VBA code to sort data, after putting a start date in T4 and a final date in

    Does anyone know if this is feasible by VBA?

    I attached a workbook with another example.
    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. Replies: 1
    Last Post: 05-20-2017, 10:29 AM
  2. VBA Filter data betwen start date and end date doesn't run on MS.Excel 2013
    By okido in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2017, 10:46 AM
  3. Data Analysis: Compare initial date with final date by looking up the latest revision
    By White_Glint in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2015, 02:31 PM
  4. Counting if data falls on date between Start Date, End Date or Possible End Date
    By JessHasQuestions in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-26-2014, 08:01 AM
  5. [SOLVED] How to sort the data by item code first, then sort them by date?
    By Zecond in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-04-2013, 01:55 AM
  6. Replies: 1
    Last Post: 10-02-2012, 02:42 PM
  7. Replies: 4
    Last Post: 06-02-2012, 11:26 AM

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