View Single Post
  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

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