+ Reply to Thread
Results 1 to 8 of 8

Macro update to sort between two dates

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Macro update to sort between two dates

    As the macro runs now it gives you the option to choose a salesman (Sheet2 B1) and a maximum date (Sheet2 B2) and then it does its breaks down.

    I need to add two more levels of functionality which are obviously beyond my VBA ability.

    1) I need to add a minimum date (Sheet2 B3) so eventually you are able to give the beginning and ending dates for the search.
    2) I need to also add the ability (you can see I added “ALL” to the drop down menu (Sheet2 B1) to choose ALL salesmen and have the macro then break down the lists including them all.

    Thank you for your assistance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro update to sort between two dates

    Between dates meant <max and >min.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Macro update to sort between two dates

    In between dates is working great but the ALL function seems to not. What I would like it to do is just ignore the salesmen names and just sort them into the correct columns.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro update to sort between two dates

    Where are the names of sales man? I thought, you use sales man as the value to find. Did you check the result in sheet2. All I did to you code is to include all sales man, that is, all names in column B needs to be searched.

  5. #5
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Macro update to sort between two dates

    Sales names are H2:H6 on sheet1.
    When i say ALL and run the macro now. it should show all data for each color ignoring the salesmen. It looks now like its repeating.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro update to sort between two dates

    No, I am missing something. The code you have selects the sales man from B1 and finds all, let's say, Tim's data.
    By ALL, you meant you want to select all sales men. Is this right? If so, you have repeated names in column B. Please include a sample out put.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro update to sort between two dates

    Sorry!
    You are right! It is repeating, so I need to use a unique column names which is column H.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Macro update to sort between two dates

    A tempoarary solution just for the Min and Max Dates
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

+ 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] Help with Macro (now to sort by dates)
    By pennbowl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2014, 07:07 AM
  2. Replies: 1
    Last Post: 09-14-2014, 02:10 PM
  3. [SOLVED] update Sort Macro
    By summer2010 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2013, 05:21 AM
  4. Macro to sort pivot tables and only show dates for current week.
    By jcranst in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2013, 08:06 AM
  5. Custom Sort Macro - Update on Data Entry
    By cuso524 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2010, 01:38 PM
  6. Macro to update specified dates automatically
    By mrcois in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-03-2010, 03:36 PM
  7. Get macro to sort dates properly
    By DamienC in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-21-2008, 02:53 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