ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programmatically Sorte Rows that are Arranged in Subgroups. (https://www.excelbanter.com/excel-programming/343734-programmatically-sorte-rows-arranged-subgroups.html)

code_hungry

Programmatically Sorte Rows that are Arranged in Subgroups.
 
Would like to write a macro that will allow me to sort a group of rows
without knowing how many rows are in the range. The number of rows change
each day I have to sort the sheet.

Each time I have to sort a spreadsheet named €śWarehouse€ť, I have to select
the rows that contain the information about a specific warehouse in my
company. The information comes to me already grouped by warehouse number, but
the number of rows containing information about any specific warehouse
changes each day.

The warehouse groups are arranged in ascending order and each group is
separated by a €śTotal€ť row.

Here is how the sheet looks like:

Wrhs# Invice# $Sold $Purchasd
--------------------------------------------------------
10 AB25451 1,000
10 CC5246 500
10 GH549687 200
10 FR534684 150
--------------------------------------------------------
Total $1500 $350
--------------------------------------------------------
14 BJ1654 580
14 KJ86460 350
14 KJ98704 520
--------------------------------------------------------
Total $930 $520

--


Vacation's Over

Programmatically Sorte Rows that are Arranged in Subgroups.
 
Help "Excel List"

List functionality should support the layout you posted.

"code_hungry" wrote:

Would like to write a macro that will allow me to sort a group of rows
without knowing how many rows are in the range. The number of rows change
each day I have to sort the sheet.

Each time I have to sort a spreadsheet named €śWarehouse€ť, I have to select
the rows that contain the information about a specific warehouse in my
company. The information comes to me already grouped by warehouse number, but
the number of rows containing information about any specific warehouse
changes each day.

The warehouse groups are arranged in ascending order and each group is
separated by a €śTotal€ť row.

Here is how the sheet looks like:

Wrhs# Invice# $Sold $Purchasd
--------------------------------------------------------
10 AB25451 1,000
10 CC5246 500
10 GH549687 200
10 FR534684 150
--------------------------------------------------------
Total $1500 $350
--------------------------------------------------------
14 BJ1654 580
14 KJ86460 350
14 KJ98704 520
--------------------------------------------------------
Total $930 $520

--



All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com