Solved

How do I find the end of excel range and then filter that range

Posted on 2011-03-15
1
173 Views
Last Modified: 2012-05-11
Hello Exports,

I have a range that goes from column A to column M, but the number of rows can vary.  I would like to use VBA to find the end of the range and then filter that range to show all values in column M that are less than 7.25

Any suggestions on how I could do this?

Thanks in advance.
JJ
0
Comment
Question by:JJINFM
1 Comment
 
LVL 9

Accepted Solution

by:
McOz earned 500 total points
Comment Utility
Use some code like this:
Sub filterRange()
    Cells(1, 1).End(xlToRight).End(xlDown).AutoFilter Field:=13, Criteria1:="<7.25"
End Sub

Open in new window


It finds the end of the data both in columns and rows (starting in A1), and filters it all by column M (13) where value is less than 7.25

Good luck!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now