Macro Assistance

66Deuce

New Member
Joined
Jul 28, 2011
Messages
3
Hello all! I'm new to the forum and am a total nube when I comes to excel. I am trying to create a macro that is more than recording a few steps the macro recorder therefore I need some assistance writing the code. The below process currently take me a few hours to accomplish manually.

1. First off is I pull an extract from another data base and copy it into excel. It is placed in Sheet 1 column A and has around 5000 rows.

2. What I then do is have to parse the data into different sheets around 30 of them. This is where I need the macro

3. The amount of data in each of the extracts is different therefore I can't set a specific row to row of data to copied and pasted in the macro.

4. I need it to perform a search in Sheet 1 for a specific value in one of the rows, say 100D, then have the macro remember the row 100D was in

5. Then perform another search for another value, say 200D, then have it remember the row it is in.

6. Then have it copy the selection from row 100D was in through to the row the 200D minus 1 row therefore capturing all the data for the 100D portion of the extract.

7. Then the data pasted is to the desired sheet2 (100D data)

8. Then have it go back to Sheet 1 and delete the Selection that was pasted into Sheet2

9. I will need to complete this transaction for 30 sheets of data. The next would be the same but searching for 200D, and then 300D and so on.

I hope this makes sense and if it doesn’t please let me know.

I hope this can be accomplished using a single macro and know that any direction is greatly appreciated.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hello all! I'm new to the forum and am a total nube when I comes to excel. I am trying to create a macro that is more than recording a few steps the macro recorder therefore I need some assistance writing the code. The below process currently take me a few hours to accomplish manually.

1. First off is I pull an extract from another data base and copy it into excel. It is placed in Sheet 1 column A and has around 5000 rows.

2. What I then do is have to parse the data into different sheets around 30 of them. This is where I need the macro

3. The amount of data in each of the extracts is different therefore I can't set a specific row to row of data to copied and pasted in the macro.

4. I need it to perform a search in Sheet 1 for a specific value in one of the rows, say 100D, then have the macro remember the row 100D was in

5. Then perform another search for another value, say 200D, then have it remember the row it is in.

6. Then have it copy the selection from row 100D was in through to the row the 200D minus 1 row therefore capturing all the data for the 100D portion of the extract.

7. Then the data pasted is to the desired sheet2 (100D data)

8. Then have it go back to Sheet 1 and delete the Selection that was pasted into Sheet2

9. I will need to complete this transaction for 30 sheets of data. The next would be the same but searching for 200D, and then 300D and so on.

I hope this makes sense and if it doesn’t please let me know.

I hope this can be accomplished using a single macro and know that any direction is greatly appreciated.


hmmm i think i would like an example of the data (can be made up so long as i understand what is going on).

the searching can be done no probs (vlookup is my friend)
same with copy of and delete. would need to know what the criteria for the row selection is (eg anything containing the word "blah")
 
Upvote 0
Would it be best if I sent you the excel file?
Better would be if you posted it to one of the free file sharing websites on the Internet so that whoever wanted to try their hand at helping you could do so easily.

You can post your file online using one of these free posting websites...

Box: http://www.box.net/files
MediaFire: http://www.mediafire.com
FileFactory: http://www.filefactory.com
FileSavr: http://www.filesavr.com
FileDropper: http://www.filedropper.com
RapidShare: http://www.rapidshare.com

Then post the URL they give you for the file back here.
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,550
Members
452,927
Latest member
rows and columns

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top