ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sorting columns on weekdays (https://www.excelbanter.com/excel-programming/430846-sorting-columns-weekdays.html)

Michel

Sorting columns on weekdays
 

Hello,

I have a column with a range of subsequent dates. I want to sort them on
weekdays, so that all the mondays come first one after the other, then all
tuesdays, then all wednesdays and so on...

How can I achieve this?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel


EricG

Sorting columns on weekdays
 

You might try using a "helper" column. In an unused column, put the
following formula in the first cell with a date in your original column:

=WEEKDAY(A2,2)

The "2" in the formula ensures that Monday is the first day of the week.
Drag this formula down your helper column to cover all the cells that have a
date in your original column.

Then you can sort your data based on the integers in the helper column.

HTH,

Eric
--
..-------------------:
If toast always lands butter-side down, and cats always land on their feet,
what happen if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )


"Michel" wrote:

Hello,

I have a column with a range of subsequent dates. I want to sort them on
weekdays, so that all the mondays come first one after the other, then all
tuesdays, then all wednesdays and so on...

How can I achieve this?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel


Dave Peterson

Sorting columns on weekdays
 

You could use another column with a formula like:
=weekday(a1,2)

You'll see 1 thru 7.

1 is Monday ... 7 is Sunday

Then you can sort your data by this helper column.

Michel wrote:

Hello,

I have a column with a range of subsequent dates. I want to sort them on
weekdays, so that all the mondays come first one after the other, then all
tuesdays, then all wednesdays and so on...

How can I achieve this?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel


--

Dave Peterson

Dave Peterson

Sorting columns on weekdays
 

You've got more replies at your other post, too.

Michel wrote:

Hello,

I have a column with a range of subsequent dates. I want to sort them on
weekdays, so that all the mondays come first one after the other, then all
tuesdays, then all wednesdays and so on...

How can I achieve this?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel


--

Dave Peterson

Michel

Sorting columns on weekdays
 

Hello,

To all that did reply: many thanks.
I wondered if a solution was possible without adding an extra column. Can
you sort the actual colomn in which the dates are, by means of a function or
a programming aid, so that the actual column, that contains the dates is
sorted without adding another column?

Many thanks and greetings,

Michel


Dave Peterson

Sorting columns on weekdays
 

There may be a convuluted way, but I don't think that there's anything as
straightforward as the suggestion you have.

Michel wrote:

Hello,

To all that did reply: many thanks.
I wondered if a solution was possible without adding an extra column. Can
you sort the actual colomn in which the dates are, by means of a function or
a programming aid, so that the actual column, that contains the dates is
sorted without adding another column?

Many thanks and greetings,

Michel


--

Dave Peterson


All times are GMT +1. The time now is 02:32 PM.

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