+ Reply to Thread
Results 1 to 3 of 3

Trying to auto sort and set the print area for a report

  1. #1
    Registered User
    Join Date
    01-24-2020
    Location
    edmonton, canada
    MS-Off Ver
    2013
    Posts
    16

    Trying to auto sort and set the print area for a report

    Hello everyone!

    So I have a new task and I'm sure there is a way to automate it some. So at the end of each week I need to make a report that sorts based on the salesperson and date. So I would like a macro that would seperate each of column F into groups and then seperates It by date (ascending). Can anyone help me accomplish this? Or how do I do this? While I am sure there is a way based on filters and copying and pasting, it seems like a macro would make it go a lot quicker. At the end of the macro it should set the print area to the sorted lists. I included a before and after that should demonstrate what I am trying to accomplish.

    Any help is appreciated. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi !

    As a tip : using a filter directly on the data you do not ever need to create any 'after' range, just print the filtered data …

  3. #3
    Registered User
    Join Date
    01-24-2020
    Location
    edmonton, canada
    MS-Off Ver
    2013
    Posts
    16

    Re: Trying to auto sort and set the print area for a report

    That does work and I have done that. The after area was shown to represent what I was wanting it to look like. Using the sort function which is easy with the recorder does order it the right way, but I would like to have it insert two rows between each initial (DF->JK) (JK->KM) (KM->LM). Then be able to select the top left cell (one above the top quote number for each line) and write the name based on an if function. I'm not sure how to tell it to go to that initial and then write the if function.

    So for example in the after area of the worksheet I uploaded I would like I3 to write "if K4 = "KM" then write "Name here". Then do that for each of the remaining.

+ 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. Macro to Set Print Area and Print Report
    By jaredmccullough in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-14-2014, 04:03 AM
  2. Help, set auto print Area
    By Phamaily in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2014, 06:22 PM
  3. Auto Adjust Print Area
    By bgreen in forum Excel General
    Replies: 7
    Last Post: 01-02-2014, 01:42 AM
  4. Need to auto set print area and add comment to last row
    By clng in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2008, 05:49 AM
  5. Set Print Area based on Sort
    By crjpilot in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-16-2008, 09:36 AM
  6. Auto Print Area
    By Kstalker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2006, 12:27 AM
  7. [SOLVED] Auto Set Print Area
    By RD Wirr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-11-2005, 12:05 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