+ Reply to Thread
Results 1 to 10 of 10

Macro - Split into Multiple Worksheets

  1. #1
    Registered User
    Join Date
    02-26-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Macro - Split into Multiple Worksheets

    Hi,

    first post, hope I don't make too many gaffes

    I found this macro that does what I want but I need to change it slightly.

    It splits a big list onto different worksheets based on a category in column A.

    I've tried but I can't work out how to make it look in a different column. Here's the code I have now, I already improved it to work with long category names with spaces in them.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro - Split into Multiple Worksheets

    This now restuctured so you only have to set the one variable "fCol" (for column) at the top of the macro. If you want column A, set fCol = 1, for column D, set fCol = 4.
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 02-27-2010 at 12:03 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-26-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Macro - Split into Multiple Worksheets

    Thanks Jerry, I'll be trying that on Monday when i get back to the office.

    Any chance of commenting your code so I can understand what it's doing?

    Thanks again.
    John.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro - Split into Multiple Worksheets

    Code above edited to add more comments.

  5. #5
    Registered User
    Join Date
    02-26-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Macro - Split into Multiple Worksheets

    Just tested that at work and it's spot on...

    thanks again Jerry, that's gonna save me hours!

  6. #6
    Registered User
    Join Date
    05-18-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Macro - Split into Multiple Worksheets

    I have just tried it out and it is going to make my life a lot easier Jerry... Thanks a lot

  7. #7
    Registered User
    Join Date
    09-16-2010
    Location
    Glasgow
    MS-Off Ver
    2010
    Posts
    68

    Re: Macro - Split into Multiple Worksheets

    Brilliant, it just works perfect for me too. Thanks Jerry.

  8. #8
    Registered User
    Join Date
    11-13-2012
    Location
    UAE
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Macro - Split into Multiple Worksheets

    'Samall addition to select the column to split , no need of hard coding column number.
    enter column # through input box.
    'Enter the column # here to evaluate, column A = 1
    fCol = InputBox("Split column number")

  9. #9
    Registered User
    Join Date
    03-04-2013
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Macro - Split into Multiple Worksheets

    I was looking for something like this and found many macros, but this one works the best. Thanks a lot!

  10. #10
    Registered User
    Join Date
    07-19-2013
    Location
    Washington, DC
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Macro - Split into Multiple Worksheets

    This was VERY HELPFUL, THANK YOU!!!!

+ 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