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

Rows Select Macro

camdevl09

New Member
I am trying to select data in a group of columns and I want the row it ends on to be based on data in column C. So, I am trying to select everything in columns AG2:AQ2 and down to the last row that has a value in column C. Since column AQ2 will have empty cells, I can not use the basic : Range(Selection, Selection.End(xlDown)).Select.


I tried this, but it is giving me a error message when I run the macro:


Range("AG2:AQ2").Select

Range(Selection, Cells(Rows.Count, "C").End(xlUp).Row).Select


Any thoughts? And thank you in advance.
 
[pre]
Code:
Range("AG2", Cells(Cells(Rows.Count, "C").End(xlUp).Row,"AQ")).Select
[/pre]

Range with two arguments requires top left cell and bottom left cell.
 
Back
Top