macro to copy multiple rows to separate worksheets

G

Guest

Hi:
I have a range of data on a single worksheet:
1 name1 address1
1 name2 address2
2 name3 address3
3 name4 address4
3 name5 address5
3 name6 address6

I have to copy all rows with 1 in column A to a separate worksheet called 1,
and the same for "2" and "3". I'm a bit iffy on how to use the VLOOKUP (is
it relevant here?). I have 1500 lines of data so am looking to automate.

thanks for your help.
 
D

Dave Peterson

I'd use a macro.

You may want to look at the way Ron de Bruin and Debra Dalgleish approached it:

Ron de Bruin's EasyFilter addin:
http://www.rondebruin.nl/easyfilter.htm

Code from Debra Dalgleish's site:
http://www.contextures.com/excelfiles.html

Create New Sheets from Filtered List -- uses an Advanced Filter to create
separate sheet of orders for each sales rep visible in a filtered list; macro
automates the filter. AdvFilterRepFiltered.xls 35 kb

Update Sheets from Master -- uses an Advanced Filter to send data from
Master sheet to individual worksheets -- replaces old data with current.
AdvFilterCity.xls 55 kb

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
G

Guest

Thanks a mill Dave. Debra Dalgleish's code worked a treat. I'm now going to
try and figure out how it actually works! Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top