Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
sorting rows wich can vary in number
Hello,
Im working on a standard excel sheet wich is going to be used in many projects. Because of this de row count can vary. I have to do sort functions in these rows, therefor i made a macro and copied this macro under a commandbutton. This works perfectly. BUT how can I make something like this with a variable row count??? Thanks in advance.... |
#2
|
|||
|
|||
Hi
why not sore the entire columns (just make the range big enough) "Bart" wrote: Hello, Im working on a standard excel sheet wich is going to be used in many projects. Because of this de row count can vary. I have to do sort functions in these rows, therefor i made a macro and copied this macro under a commandbutton. This works perfectly. BUT how can I make something like this with a variable row count??? Thanks in advance.... |
#3
|
|||
|
|||
I thought of that, but there is a sommation and more calculations below to
lowest input row like this simplified list : 1 15 \ 2 20 rows that have to be sorted 3 25 / --------- + 6 60 "Frank Kabel" wrote: Hi why not sore the entire columns (just make the range big enough) "Bart" wrote: Hello, Im working on a standard excel sheet wich is going to be used in many projects. Because of this de row count can vary. I have to do sort functions in these rows, therefor i made a macro and copied this macro under a commandbutton. This works perfectly. BUT how can I make something like this with a variable row count??? Thanks in advance.... |
#4
|
|||
|
|||
In your macro, calculate the range
cLastRow = Cells(Rows.Count,"A").End(xlUp).Row Set myRange = Range("A1", Cells(clastrow-2,"B") ' allow for sum line and dashes line and sort myRange. Obviously adjust the cells to your data -- HTH RP (remove nothere from the email address if mailing direct) "Bart" wrote in message ... I thought of that, but there is a sommation and more calculations below to lowest input row like this simplified list : 1 15 \ 2 20 rows that have to be sorted 3 25 / --------- + 6 60 "Frank Kabel" wrote: Hi why not sore the entire columns (just make the range big enough) "Bart" wrote: Hello, Im working on a standard excel sheet wich is going to be used in many projects. Because of this de row count can vary. I have to do sort functions in these rows, therefor i made a macro and copied this macro under a commandbutton. This works perfectly. BUT how can I make something like this with a variable row count??? Thanks in advance.... |
#5
|
|||
|
|||
That did it, thanks a lot.
"Bart" wrote: Hello, Im working on a standard excel sheet wich is going to be used in many projects. Because of this de row count can vary. I have to do sort functions in these rows, therefor i made a macro and copied this macro under a commandbutton. This works perfectly. BUT how can I make something like this with a variable row count??? Thanks in advance.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Seed numbers for random number generation, uniform distribution | Excel Discussion (Misc queries) | |||
sorting detail rows - summary row in an outline | Excel Discussion (Misc queries) | |||
increasing the number of rows of a worksheet beyond 65536? | Excel Discussion (Misc queries) |