Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable upper and Lower row selection
Hello all,
I have the following Rows("1:" & x).Select But now I am trying to find the syntax for selecting rows based on two variables. ie. x= upper_limit y=lower_limit Rows(x:y).Select this gives me an error: Expected list seperator or ) Help please. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable upper and Lower row selection
rows(X & ":" & Y).Select
make sure there is a space between the variable and the ampersand. -- Regards, Tom Ogilvy "Bythsx-Addagio" wrote: Hello all, I have the following Rows("1:" & x).Select But now I am trying to find the syntax for selecting rows based on two variables. ie. x= upper_limit y=lower_limit Rows(x:y).Select this gives me an error: Expected list seperator or ) Help please. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable upper and Lower row selection
It would be something like:
Workbooks("Book1.xls").Worksheets("Sheet1").Range( CStr(x) & ":" & CStr(y)).Select The Rows object is actually a collection object, thus the argument within the paranthesis is expecting a numeric value from 1 to the number of rows within that collection, such as if x is 4 and y is 9, then the Rows collection object would have a total of 6 different Row objects within it as indicated by the Count property on the Rows collection object: Workbooks("Book1.xls").Worksheets("Sheet1").Range( CStr(x) & ":" & CStr(y)).Rows.Count -- Ronald R. Dodge, Jr. Production Statistician/Programmer Master MOUS 2000 "Bythsx-Addagio" wrote in message ... Hello all, I have the following Rows("1:" & x).Select But now I am trying to find the syntax for selecting rows based on two variables. ie. x= upper_limit y=lower_limit Rows(x:y).Select this gives me an error: Expected list seperator or ) Help please. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Upper Case Letters to First Letter Upper, Remaining Letters Lower | Excel Discussion (Misc queries) | |||
convert lower to upper case automatically without using UPPER | Excel Discussion (Misc queries) | |||
Changing upper case characters to upper/lower | Excel Discussion (Misc queries) | |||
Change from mixed caps and upper lower to all upper lower case | Excel Worksheet Functions | |||
How do I convert all upper case excel sheet into upper and lower . | Excel Discussion (Misc queries) |