#1   Report Post  
jh
 
Posts: n/a
Default Conditional Copy

I have a spreadsheet with 25,000 rows of data. I need to copy all
rows which have the same value in colum A to a new sheet. Is there
any way to do this automaticaally. Assume there are 50-60 different
sheets that need to be created. As a second condition could I have
this rename the name of the sheet to match the value in Column A?
Thanks
  #2   Report Post  
Mark
 
Posts: n/a
Default

Hi,
you will need to ascertain what the common value is to
identify. For example: if any cell in column A has "YES"
then copy that entire row(?) and paste it ot a new sheet.
If you cannot get any help here, could you send some
sample data and the value to find, to me, and I will
create something.
See my stuff at:
http://www.geocities.com/excelmarksway



- -Mark

-----Original Message-----
I have a spreadsheet with 25,000 rows of data. I need to

copy all
rows which have the same value in colum A to a new

sheet. Is there
any way to do this automaticaally. Assume there are 50-

60 different
sheets that need to be created. As a second condition

could I have
this rename the name of the sheet to match the value in

Column A?
Thanks
.

  #3   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi JH

Two ways
http://www.rondebruin.nl/copy5.htm

Or a add-in
http://www.rondebruin.nl/easyfilter.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"jh" wrote in message om...
I have a spreadsheet with 25,000 rows of data. I need to copy all
rows which have the same value in colum A to a new sheet. Is there
any way to do this automaticaally. Assume there are 50-60 different
sheets that need to be created. As a second condition could I have
this rename the name of the sheet to match the value in Column A?
Thanks



  #4   Report Post  
jh
 
Posts: n/a
Default

Ron,
It copied the vlaues in column A and renamed the sheets to match.
However the remaining values in the rwo are missing. Any thoughts?
Thanks for your help so far. BTW I've been looking for a way to sort
workshhets, found that through your help as well. Thanks/

"Ron de Bruin" wrote in message ...
Hi JH

Two ways
http://www.rondebruin.nl/copy5.htm

Or a add-in
http://www.rondebruin.nl/easyfilter.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"jh" wrote in message om...
I have a spreadsheet with 25,000 rows of data. I need to copy all
rows which have the same value in colum A to a new sheet. Is there
any way to do this automaticaally. Assume there are 50-60 different
sheets that need to be created. As a second condition could I have
this rename the name of the sheet to match the value in Column A?
Thanks

  #5   Report Post  
Ron de Bruin
 
Posts: n/a
Default

However the remaining values in the rwo are missing

Change your range then

With WS.Range("YourRange")

To something like this

With WS.Range("A1:Z1000")



--
Regards Ron de Bruin
http://www.rondebruin.nl


"jh" wrote in message om...
Ron,
It copied the vlaues in column A and renamed the sheets to match.
However the remaining values in the rwo are missing. Any thoughts?
Thanks for your help so far. BTW I've been looking for a way to sort
workshhets, found that through your help as well. Thanks/

"Ron de Bruin" wrote in message ...
Hi JH

Two ways
http://www.rondebruin.nl/copy5.htm

Or a add-in
http://www.rondebruin.nl/easyfilter.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"jh" wrote in message om...
I have a spreadsheet with 25,000 rows of data. I need to copy all
rows which have the same value in colum A to a new sheet. Is there
any way to do this automaticaally. Assume there are 50-60 different
sheets that need to be created. As a second condition could I have
this rename the name of the sheet to match the value in Column A?
Thanks





  #6   Report Post  
 
Posts: n/a
Default

Thaqt worked, thanks!

  #7   Report Post  
 
Posts: n/a
Default

Ron,
I moved the code into a larger spreadsheet I have on this line
Set rng =
ws1.Range("=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$ A:$A),COUNTA(Sheet1!$1:$1))")
I get an error message: runtime error '9" subscript out of range.
If you'll notice I used the dynamic code for figuring out the range.
Any thoughts?
Thanks again.
JH

  #8   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi JH

Use the range name in the code.
See Debra's site for a example
http://www.contextures.com/xlNames01.html#Dynamic


--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message oups.com...
Ron,
I moved the code into a larger spreadsheet I have on this line
Set rng =
ws1.Range("=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$ A:$A),COUNTA(Sheet1!$1:$1))")
I get an error message: runtime error '9" subscript out of range.
If you'll notice I used the dynamic code for figuring out the range.
Any thoughts?
Thanks again.
JH



  #9   Report Post  
 
Posts: n/a
Default

I tried that, that is where the line I referenced above came from. I
substitued the last couint if to make the number of rows dynamic. I
guess I could just give it a value instead. Thanks

  #10   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi

After you used Debra's example use this in the code

Set rng = ws1.Range("NameList")


--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message oups.com...
I tried that, that is where the line I referenced above came from. I
substitued the last couint if to make the number of rows dynamic. I
guess I could just give it a value instead. Thanks



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
Automatic backup copy craigq Charts and Charting in Excel 2 April 11th 05 04:57 PM
conditional format of data tables in charts [email protected] Charts and Charting in Excel 2 January 25th 05 03:56 PM
copy paste cell character limit Fred Excel Discussion (Misc queries) 1 December 2nd 04 08:58 PM
Conditional display of a .jpeg file? sbhogle Excel Discussion (Misc queries) 2 November 30th 04 05:57 AM
Adding more than three Conditions to 'Conditional Formatting' David McRitchie Excel Discussion (Misc queries) 1 November 27th 04 06:03 PM


All times are GMT +1. The time now is 11:54 AM.

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

About Us

"It's about Microsoft Excel"