LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Copying data & creating new worksheets - error

Never mind!

Dave Peterson wrote:

CR1 is an address. You're putting the unique list on that ws1 worksheet in cell
CR1.

But I didn't see where you set ws1 variable to any worksheet.

Set ws1 = activesheet
or
set ws1 = worksheets("sheet99") '<--change to what you want.

This set statement has to be before your
Set rng = ws1.Range("A1", ("A" & NoAccounts)).Product '<<< Change
line.

Jen wrote:

Tom,

I tried setting the worksheet both ways that you suggested. It's still
getting caught up on this, with the same variable not defined error
message:

rng.Columns(1).AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=.Range("CR1"), Unique:=True

I haven't defined the range CR1, how do I go about doing that?

Thanks,
Jennifer


--

Dave Peterson


--

Dave Peterson
 
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
copying data between worksheets SURGEON1971 Excel Discussion (Misc queries) 2 March 26th 09 08:50 AM
I get an error message while copying worksheets between workbooks CRACARCONSTRUCTION Excel Discussion (Misc queries) 1 February 16th 09 09:56 PM
Copying data across worksheets Maki Excel Discussion (Misc queries) 2 September 15th 08 02:40 PM
Copying data across different worksheets Nic M Excel Discussion (Misc queries) 4 May 8th 06 09:30 PM
Macro programming for Creating New Sheets and Copying Data Addy Excel Programming 1 May 1st 06 05:04 PM


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