Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OrlaH
 
Posts: n/a
Default macro to copy multiple rows to separate worksheets

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.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default macro to copy multiple rows to separate worksheets

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

OrlaH wrote:

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.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OrlaH
 
Posts: n/a
Default macro to copy multiple rows to separate worksheets

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.

"Dave Peterson" wrote:

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

OrlaH wrote:

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.


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing multiple rows of worksheets in a workbook Huber57 Excel Discussion (Misc queries) 2 March 13th 06 01:07 AM
Macro to copy cells to rows below [email protected] Excel Discussion (Misc queries) 1 January 20th 06 06:59 PM
Create a Macro that will copy the rows that have a value < 0 wil4d Excel Discussion (Misc queries) 1 December 18th 05 05:28 PM
sharing rows of data across multiple worksheets within a workbook deedle93 Excel Worksheet Functions 2 August 18th 05 01:24 AM
inset rows and copy formatting , excel macro sloanranger Excel Discussion (Misc queries) 13 March 9th 05 11:44 PM


All times are GMT +1. The time now is 10:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"