• 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.

How do I move to bottom of data results?

Joe Egan

New Member
Here we go.

I have Cells with formulas referring to a table. Let's say A3:F23

The first X rows display a number where it has found it in the Table. Let's say A3:F10
The remaining rows (A11:F23) do not display anything (although there are formulas there)
I want to print to the first X rows (A3:F10) only - not to the bottom of where the formulas exist.

If I press END+Home it goes to the bottom of the formulas (F23) not to the bottom of X rows (F10).

Any suggestions?

Thanks in advance
 
Joe

Firstly, Welcome to the Chandoo.org Forums

Do you mean with a Key Strokes / Mouse or via VBA ?
 
Thanks for getting back to me Hui and thanks for your welcome,

I want to assign a Macro to a button to enable me to select the range each time. This report has over 50 repetitions of selecting the appropriate range to print.

I guess it would ultimately need to be VBA.

Thanks again
 
Joe

The solution may depend on what type of data the range has

But something like this should work

Code:
Dim rng As Range

Set rng = Range("A:A")
Debug.Print rng.Find("0").Row

If you get stuck please post a sample file with example data and formula
 
Back
Top