+ Reply to Thread
Results 1 to 4 of 4

Need help in creating a marco/formula/VBA script to sort sales data.

  1. #1
    Registered User
    Join Date
    06-24-2014
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    12

    Question Need help in creating a marco/formula/VBA script to sort sales data.

    Hello all!

    I am having some difficulties in getting Excel to do what I want. I have a workbook for sales and all my teams information is in one big sheet. What I want to do is find every row that has "Salesman's Name" in a column, copy a range with that row and paste it into another sheet. Here's the catch, when the macro is run, I do not want it to re-copy and paste the data it already has. I want it to look for new data entered on the data sheet and add it to the growing list on that salespersons indiviual sheet.

    For example:

    A B C D E F
    1 Date Product Client Salesperson Amount Commission
    2 4/1/2014 ABC Bob Ryan $2,000 $200
    3 4/8/2014 ABC Shirley Steve $1,500 $100
    4 5/4/2014 XYZ Brad Melissa $2,400 $500
    5 5/6/2014 PDQ Jeremy Ryan $4,200 $750
    6 5/9/2014 XYZ Pam Melissa $800 $150
    7 6/7/2014 ABC John Ryan $1,250 $250

    I want to be able to search for all of Ryan's sales and populate them into his sheet. But only those specifc cells, because his sheet will have additional data in Column G that needs to stay. If I perform the macro/formula/VBA script, on 5/10/2014, for Ryan, it would pull data from Row 2 and Row 5, and only Columns A through F. When I run it again on 6/10/2014, I would like it to add just Row 7 to the growing list on his sheet instead of replacing the data that was already transferred.

    Can anyone give me some guidance?

    Thanks!!

  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: Need help in creating a marco/formula/VBA script to sort sales data.

    Hi,

    Are you sure this is the best way of proceeding? Don't forget that you use both Data (Auto) Filter and Advanced Filter to filter a database in place. Or you may find a Pivot Table will be more efficient and useful.

    What I'm saying is do you really need a separate sheet for each individual when you are able to manipulate the main database.
    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
    Registered User
    Join Date
    06-24-2014
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Need help in creating a marco/formula/VBA script to sort sales data.

    I do need seperate sheets. Both for their reporting purposes and mine. I was looking for a way to automate this step because sorting it all and transferring the data by hand is very time consuming.

  4. #4
    Registered User
    Join Date
    06-24-2014
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Need help in creating a marco/formula/VBA script to sort sales data.

    Here's a edited version of my data sheet. I want to filter for a sales person, take the whole row where their name appears and paste it into their own worksheet.

    Sales Data.xls

+ 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] I have a sort macro. How to add script to preselect rows to sort based on column value?
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-09-2014, 02:25 AM
  2. Help with Sort Marco
    By mtndewgradon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2013, 04:22 PM
  3. Help creating math formula for sales analysis?
    By STrumbore in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-03-2012, 05:36 PM
  4. Need help with a sort marco
    By MannyLNJ in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-17-2012, 05:39 PM
  5. Repeat script or marco dependent on the value in a cell
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2012, 05:28 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