CrossTab Query Month as ColumnHeader but sort by Name

mrchonginhk

Well-known Member
Joined
Dec 3, 2004
Messages
679
I have a Crosstab query with date as column field.
I have formatted this date field so that it is Jan, Feb etc.
However, the output is such that the column sorting is based on the spelling of these Jan, Feb so order is Dec, Feb, Mar, Jan, Jul etc instead of Jan, Feb, Mar....
What is the solution to make the columns Jan, Feb, Mar etc ?
Thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
In Design view, right-click in the grid of the month field and select Properties.
In the Column Headings property put the months in their correct order, eg
'Jan','Feb','Mar' ... 'Dec'

Denis
 
Upvote 0
Thanks. I searched the article showing exact solution like yours.
But I have a problem with this approach. That will always show 12 columns and I do not want blank columns to appear. ie if there is only May and Jun data, that solution will have all other ten columns of zero values which is not I want... help...

Is it possible the pivot field be sorted based on other value like MonthValue but header text use month name ?
 
Upvote 0
I'm not sure that you can, at least not through the interface.

If the month is pivoted to the Row Heading you can sort by month number and put other items across the top but otherwise I'm not sure how you would do it without VBA.

Denis
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top