+ Reply to Thread
Results 1 to 8 of 8

Macro to separate out raw data

  1. #1
    Registered User
    Join Date
    04-30-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2013
    Posts
    59

    Macro to separate out raw data

    Very difficult but any help or direction would be GREATLY appreciated. Here is what I am trying to accomplish:

    I am trying to write a macro that will separate out the 'Data' tab in the attached document. It will look in Column 'D' from the 'Data' tab and match the name with the worksheet.

    1.) Column A from the data tab would go into the 'submitted date' field for the different tabs
    2.) Column J would go in the 'client name' column
    3.) Column L would go in the 'carrier' column
    4.) Column M would go into the 'monthly premium' column
    5.) Column Z would go into the 'status' column
    6.) Lastly, Column C in the data tab would have to read 'Medicare Supplement'. If it read something else, it would not go into the 'Medicare Supplement' section of each worksheet. It would just stay where it is.

    In summary, if the 'Data' tab had a row that read 'Spencer Dean' in column D, the policy information for that row would populate into the 'Spencer Dean' worksheet in b6:f55.

    If this is way too complicated or not possible, please let me know. Thank you to anyone whom reads this, whether you can offer any direction or not.
    Attached Files Attached Files
    Last edited by jph89; 10-23-2012 at 01:41 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Macro to separate out raw data

    jph89,

    This is entirely possible, though its unlikely you'll find someone willing to create it for you from scratch. As some pointers to get you started, I'd loop through your different worksheet names (ignoring the worksheet name 'Data') and filter on column D for that text. Then copy paste from the 'Data' tab to that worksheet to the appropriate columns.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    04-30-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2013
    Posts
    59

    Re: Macro to separate out raw data

    tigeravatar-

    Thanks for the response. If I am reading you correctly, I attached what you were thinking I should do. I created filters for each worksheet, I'm assuming so the entire 'Data' tab could be dumped in it's entirety into each worksheet? Then the filter will bring up only the agent needed. But if I use the filter approach, it will hide columns K through T to the right that I will still need.

    Thanks for the time, again.

  4. #4
    Registered User
    Join Date
    04-30-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2013
    Posts
    59

    Re: Macro to separate out raw data

    Whoops. See attached.Commissions Help (10.18.12).xlsx

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Macro to separate out raw data

    jph89,

    Did you attach something to your most recent post or in your original post? Because I don't see an attachment in post 3 and I don't see that the original post was edited.
    (Edit: I see you have attached the file now)

    As for your question, you don't need to apply the filters on the sheets anywhere, they would only exist in the macro code. The sheet getting filtered is the 'Data' sheet column D. So if you have a sheet named "aaa" and a sheet named "bbb", sheet 'Data' column D would get filtered "aaa" and all resulting rows would be copied to sheet 'aaa' in the appropriate places. Then sheet 'Data' column D would get filtered for "bbb" and all resulting rows woulc be copied to sheet 'bbb' in the appropriate places. So the only thing getting filtered to sheet 'Data' column D. The filter criteria are the other sheet names.
    Last edited by tigeravatar; 10-22-2012 at 03:43 PM. Reason: Added edit

  6. #6
    Registered User
    Join Date
    04-30-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2013
    Posts
    59

    Re: Macro to separate out raw data

    Commissions Help (10.18.12) (2).xlsxTigeravatar--

    Like this? If i'm off again, I give up!!!!

  7. #7
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Macro to separate out raw data

    You can try this, but will error out if sheet doesn't exists

    Please Login or Register  to view this content.
    Last edited by mike7952; 10-22-2012 at 06:10 PM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  8. #8
    Registered User
    Join Date
    04-30-2012
    Location
    Missouri
    MS-Off Ver
    Excel 2013
    Posts
    59

    Re: Macro to separate out raw data

    Holy Smokes. I have to head out for the night but I THINK ITS MONEY. I'll have to do a little more investigating tomorrow.

    THANK YOU SO MUCH FOR YOUR TIME.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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