Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am trying to create a data entry sheet which automatically sorts itself each time it opens. It should sort according to a specific row (D). And I want it to only sort the rows which have data in them. I have a counter which tells me how many rows have data. I use the snippet below which works if I already know how many rows of data I have. In the code shown I sort down to row 300. Suppose I have a variable named N which is equal to the number of rows. How can I get the code to sort N rows? Worksheets("data").Range("A2,F300").Sort Key1:=Worksheets("data").Range("D2") thanks, Andrew |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting and grouping data with varying number or rows | Excel Worksheet Functions | |||
Chart changing based on change in data source (number of rows/colu | Charts and Charting in Excel | |||
Sorting Rows Based on data in one column | Excel Discussion (Misc queries) | |||
Sorting with variable number of sort fields | Excel Programming | |||
Copy Formula loop based on number of rows w/ data in a col B. | Excel Programming |