Data Advanced filter problem

mikemcbain

Board Regular
Joined
Nov 14, 2005
Messages
152
Office Version
  1. 365
Platform
  1. Windows
G'day Magicians,

I am using Windows 10 and Excel 365. Apologies in advance that I cannot get XL2BB to work.
I have my worksheet set up for Data Advanced filtering which works fine when I use my mouse and Click Data Advanced Copy to another location Unique records only and OK the extracted output range fills with the required data.
I have formulae in AU2:AY2 under headers which calculate and show as follows.....
AUAVAWAXAY
BETSWinP/LWPOT%$WIN$PLC
42​
$13.57​
-32.3%​
$28.43​
$40.84​

But when I try to do the same thing using the following recorded macro....
Sub TrainResults()
'
' TrainResults Macro
'
Application.Goto Reference:="R1C103"
Selection.End(xlDown).Select
Selection.Copy
Application.Goto Reference:="R2C17"
ActiveSheet.Paste
Application.CutCopyMode = False
Application.CutCopyMode = False
Application.CutCopyMode = False
Range("A7:AT999987").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
Range("A1:AT2"), CopyToRange:=Range("AZ7:CS7"), Unique:=True
Range("A1").Select
End Sub

Those Cells come up like this....
AUAVAWAXAY
BETSWinP/LWPOT%$WIN$PLC
0​
$0.00​
#DIV/0!​
$0.00​
$0.00​

I have tried all manner of VBA code and fancy macros all with the same result.
Is it just me and my system or can someone suggest something to try that my poor skills may not have found yet?

With thanks

Old Mike.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I don't think that you need a macro to solve this problem - with 365. Post some of your input data and what you would like your calculated output data to be. Some combination of the newer FILTER and UNIQUE functions should make quick work of it, and no clumsy macros messing up your fun.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,869
Messages
6,175,087
Members
452,611
Latest member
bls2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top