Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
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
freezing columns labels while sorting columns Stan New Users to Excel 1 December 3rd 09 11:30 AM
Sorting columns on weekdays Michel Excel Worksheet Functions 2 July 9th 09 04:10 PM
Sorting Columns Bernie New Users to Excel 5 December 29th 06 08:09 PM
help with sorting text in columns to match other columns rkat Excel Discussion (Misc queries) 1 August 11th 06 03:42 AM
Macro for formatting columns with dates, weekdays, and widths? [email protected] Excel Programming 0 January 27th 05 07:19 PM


All times are GMT +1. The time now is 05:16 PM.

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"