kgala 0 Newbie Poster

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.