• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Filtering Columns A thru .end(xlleft)

zohaib

Member
Hello,

I am using the code below to filter the cells but the column W change. For example, it could be "A:AC" so how do I insert ( .end.xlleft ) function to select the column? Thanks

Code:
ActiveSheet.Range("A:W").AutoFilter Field:=13, Criteria1:="<0"

Below is an example of what I am looking for:

Code:
ActiveSheet.Range("A:.end(xlleft)").AutoFilter Field:=13, Criteria1:="<0"

Note: the selection should be whole row. Thanks

Zohaib
 

Hi,

If you open its VBA inner help, you must see that it's a property
for a range object.

And just by reading its sample like many others in this forum threads
like in a code I wrote in one of yours previous threads
where I'm still waiting for a Like

« No arm, no chocolate ! » (No like, no further help …)
 
Marc,

I am confused. How do I open the VBA inner help? (sorry don't know excel too much). Thanks, Zohaib
 

Show your amended code.

Maybe you can use CurrentRegion property for a continuous data block …
Post a sample workbook.
 
Back
Top