+ Reply to Thread
Results 1 to 2 of 2

Copy all Rows with a cell of value 'x' to a worksheet named 'x'

  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    2

    Copy all Rows with a cell of value 'x' to a worksheet named 'x'

    I am a sql developer who has some experience with Excel but none using Macros etc. I export a data set into Excel from SQL Server. For futher analysis I need to split that dataset such that rows with a particular value end up in a particular worksheet with the name of that value.

    As an example I have some data as follows:

    Please Login or Register  to view this content.
    In the example above, I would like to send all rows containing D_RU 207 to a worksheet called 207, _RU 208 to a worksheet called 208, _RU 209 to a worksheet called 209, etc

    From what I have read I would need to use a Macro but I am not precisely sure how I would do that. I could easily create this in SQL server but the version I am using at work does not have the functionality needed. Any help you could provide would be very much appreciated

  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: Copy all Rows with a cell of value 'x' to a worksheet named 'x'

    sauce1979,

    Attached is a sample workbook based on the example data you provided. It contains a button named 'Extract Data' which is assigned to the following macro:

    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar
    Attached Files Attached Files

+ 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