Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Adv filter fails in macro, works fine manually

Excel 2007 is giving me such a headache;

Recorded macro code
Columns("B2:B2819").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("AB65000"), Unique:=True

Should extract 6 values

When run from inside a procedure it fails to extract anything;
When run manually without a macro running it works fine;
Additional info: Column A is already filtered to 1 value, now I need to get
the associated values from column B; At this point i have already ran extract
unique on column A with no problem
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Adv filter fails in macro, works fine manually

Range("B2:B2819").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range( _
"AB65000"), unique:=True



On Nov 11, 12:24*am, headly wrote:
Excel 2007 is giving me such a headache;

Recorded macro code
Columns("B2:B2819").AdvancedFilter Action:=xlFilterCopy, _
* * * *CopyToRange:=Range("AB65000"), Unique:=True

Should extract 6 values

When run from inside a procedure it fails to extract anything;
When run manually without a macro running it works fine;
Additional info: Column A is already filtered to 1 value, now I need to get
the associated values from column B; At this point i have already ran extract
unique on column A with no problem


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Adv filter fails in macro, works fine manually

I don't do advanced filtering, but I don't see any criteria.
--
HTH,

Barb Reinhardt



"headly" wrote:

Excel 2007 is giving me such a headache;

Recorded macro code
Columns("B2:B2819").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("AB65000"), Unique:=True

Should extract 6 values

When run from inside a procedure it fails to extract anything;
When run manually without a macro running it works fine;
Additional info: Column A is already filtered to 1 value, now I need to get
the associated values from column B; At this point i have already ran extract
unique on column A with no problem

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Adv filter fails in macro, works fine manually

Problem is Columns("B2:B2819")

Should be or Columns("B:B")
or
Range("B1:B2819")

Note that the header must be included when using advanced filter or the
first value becomes the column header in the filtered range.

--
Regards,

OssieMac


"headly" wrote:

Excel 2007 is giving me such a headache;

Recorded macro code
Columns("B2:B2819").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("AB65000"), Unique:=True

Should extract 6 values

When run from inside a procedure it fails to extract anything;
When run manually without a macro running it works fine;
Additional info: Column A is already filtered to 1 value, now I need to get
the associated values from column B; At this point i have already ran extract
unique on column A with no problem

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Adv filter fails in macro, works fine manually

My apologies if this post twice. I got an error when trying to post the first
time.

The problem is Columns("B2:B2819")

Should be or Columns("B:B")
or
Range("B1:B2819")

Note that the header must be included when using advanced filter or the
first value becomes the column header in the filtered range.

--
Regards,

OssieMac


"headly" wrote:

Excel 2007 is giving me such a headache;

Recorded macro code
Columns("B2:B2819").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("AB65000"), Unique:=True

Should extract 6 values

When run from inside a procedure it fails to extract anything;
When run manually without a macro running it works fine;
Additional info: Column A is already filtered to 1 value, now I need to get
the associated values from column B; At this point i have already ran extract
unique on column A with no problem



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
Macro hangs up often but sometimes works fine Jeff Excel Worksheet Functions 3 June 13th 06 01:01 PM
Macro works fine on PC; fails on Mac marlea[_16_] Excel Programming 1 March 20th 06 08:26 PM
pivot table - works manually not by macro jnewl Excel Programming 5 January 19th 06 12:47 PM
Solver GUI works fine, but the VBA macro won't return any results Ben Anderson Excel Programming 3 June 24th 05 02:48 PM
Macro works fine in xl2002 but does not in xl 2000 Nolin[_2_] Excel Programming 1 February 25th 04 05:58 PM


All times are GMT +1. The time now is 08:23 PM.

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"