+ Reply to Thread
Results 1 to 3 of 3

Copying Select Data From one EXCEL Sheet to Another

  1. #1
    Registered User
    Join Date
    11-21-2007
    Posts
    2

    Copying Select Data From one EXCEL Sheet to Another

    Hope someone can help me with a EXCEL VB code for copying select data to separate spreadsheets.

    I have a farily large spreadsheet (~5000 rows x 200 columns). Column A has three string variables. For every value in Column A there may be up to 20 variables in Column B, and for every value in Column B there may be four to five variables in Column C.

    I want a flexible code that searches (filters on) the first values in Columns A, B and C and copies the selected data (all 200 Columns) to a spreadsheet "variableA1_variableB1_variableC1." Then it increments to the next value in Column C and copies the data to a new spreadsheet "variableA1_variableB1_variableC2" until all values in Column C, B and A are are exhaused.

    Right now I am using a macro that has the variables hard wired in the autofilter criteria statement, but the code is redundant and too long.

    I want a code that searches and stores the varaibles without hard wiring the. I would appreciate any help that can be offered. I am a novice at programming at best. Thanks

    - Kishor

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    http://www.excelforum.com/attachment...4&d=1173865150
    Has an example of filtering and copying to another sheet
    you can change the destination by altering the code so it copies to another workbook
    I have enlarged the area to do that in the code below, Alt F11 gets you into the VBA editor

    In the example workbook enter one of these words
    CHEESE
    OLIVES
    pickles
    rice
    TOMATO
    in the blue cell and click the button

  3. #3
    Registered User
    Join Date
    11-21-2007
    Posts
    2

    Smile

    Thanks! I can work with it.

+ 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