Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bart
 
Posts: n/a
Default 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   Report Post  
Frank Kabel
 
Posts: n/a
Default

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   Report Post  
Bart
 
Posts: n/a
Default

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



  #5   Report Post  
Bart
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
sorting detail rows - summary row in an outline ExcelSteve Excel Discussion (Misc queries) 1 December 5th 04 02:40 PM
increasing the number of rows of a worksheet beyond 65536? ibu Excel Discussion (Misc queries) 2 November 26th 04 08:56 AM


All times are GMT +1. The time now is 07:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"