ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AdvancedFilter with VBA (https://www.excelbanter.com/excel-programming/341398-advancedfilter-vba.html)

newToExcel

AdvancedFilter with VBA
 

Hello,

I cant seem to understand this one line of code:

myLocalSheet.Range(sheetName).AdvancedFilter Action:=xlFilterCopy,
criteriaRange:=defPage.Range("QTY_Filter"),
CopyToRange:=myLocalSheet.Range("A10000"), Unique:=False

Specifically, the highlighted part,

the thing is defPage.Range("QTY_Filter") is not one cell, its 3x2
matrix with stuff in it. and some of it is text !!!! some is empty tooo
!!!!! and the 2 two rows that do have #'s have =1

So, how does THAT work ?? :confused:


--
newToExcel
------------------------------------------------------------------------
newToExcel's Profile: http://www.excelforum.com/member.php...o&userid=27192
View this thread: http://www.excelforum.com/showthread...hreadid=471593


newToExcel

AdvancedFilter with VBA
 

k. i have made a lil bit of progress since the last time i posted.

the criteria basically copies all the "non-zero" columns so for e.g.

product | qty |
------------------
prod A | - |
prod B | 1 |
prod C | 5 |

after that line of code runs, ONLY prod B and prod C will be copied
cause the qty column is =1.

I still dont understand how a 3x2 matrix can do that. i'm attaching a
snap shot of the range called "QTY_Filter".

Somebody help.....


+-------------------------------------------------------------------+
|Filename: qty_filter.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=3858 |
+-------------------------------------------------------------------+

--
newToExcel
------------------------------------------------------------------------
newToExcel's Profile: http://www.excelforum.com/member.php...o&userid=27192
View this thread: http://www.excelforum.com/showthread...hreadid=471593


newToExcel

AdvancedFilter with VBA
 

no replies !!!! :(


--
newToExcel
------------------------------------------------------------------------
newToExcel's Profile: http://www.excelforum.com/member.php...o&userid=27192
View this thread: http://www.excelforum.com/showthread...hreadid=471593



All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com