Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need to copy rows in Sheet1 to different worksheets


I tried it and get the following error:

Run-time error '9' :
Subscript out of range

Please help (sorry about this, but as I said, I am completely new t
this).

Thank

--
minx200
-----------------------------------------------------------------------
minx2001's Profile: http://www.excelforum.com/member.php...fo&userid=1516
View this thread: http://www.excelforum.com/showthread.php?threadid=27176

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Need to copy rows in Sheet1 to different worksheets

Hi

Set ws1 = Sheets("Sheet1")

Sheets("Sheet1") is the sheet with the data
If the sheet with the data not exist you get a error 9


Use a range like this
Set rng = ws1.Range("A1:G100")

The names in the is example must be in column A
If not change this line
rng.Columns(1).AdvancedFilter _

To
rng.Columns(3).AdvancedFilter _
If the names are in column C




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


"minx2001" wrote in message ...

I tried it and get the following error:

Run-time error '9' :
Subscript out of range

Please help (sorry about this, but as I said, I am completely new to
this).

Thanks


--
minx2001
------------------------------------------------------------------------
minx2001's Profile: http://www.excelforum.com/member.php...o&userid=15168
View this thread: http://www.excelforum.com/showthread...hreadid=271761



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
copy data from sheet2 to sheet1 when sheet2 has variable # of rows Anne Excel Discussion (Misc queries) 6 February 27th 09 09:48 PM
Copy Rows with a cell value 0 from several worksheets to a new sh Skeletor Excel Worksheet Functions 1 October 6th 08 09:37 PM
Copy rows with a cell value 0 from several worksheets to a new sh Skeletor Excel Worksheet Functions 3 September 30th 08 09:45 AM
Need to copy rows in Sheet1 to different worksheets minx2001 Excel Programming 1 October 23rd 04 10:13 AM
Sheet1 object not Worksheets("Sheet1") onedaywhen Excel Programming 2 August 12th 03 12:38 PM


All times are GMT +1. The time now is 08:07 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"