Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Row select with variables. 1

Status
Not open for further replies.

craiogram

MIS
Feb 20, 2004
126
US
This is probably incredibly easy but it is evading my thought process.

I need to select an entire row in exce BUT with variables. It will work with: Rows("13:13").Select

but the "13" need to be a variable. I have thried the following but it has not worked:
Rows(Cells(x5, x5), Cells(x5, x5)).Select
Range("Cells(x5, x5), Cells(x5, x5)").Select
Rows(X,X).Select
Rows("X:X").Select

Afterwards I would use:
Selection.EntireRow
Selection.Delete Shift:=xlUp
Any help would be appreciated...Thank you!
 
Rows(X & ":" & X).Select
Or even simpler:
Rows(X).Select

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 


It's not necessary to SELECT. In fact it slows down your procedure.
Code:
Rows(X).Delete Shift:=xlUp

Skip,
[sub]
[glasses] [red]Be Advised![/red]
The band of elderly oriental musicians, known as Ground Cover, is, in reality...
Asian Jasmine![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top