Crosstab column heading dates in order?

unc2plo

Board Regular
Joined
Mar 18, 2002
Messages
148
I have a crosstab query that gives me sales for an item by day throughout the week.

The query has date as a column heading, item number as row heading and the sales as value.

The dates across the top are not coming out in order. For this week they come out 2/10, 2/11, 2/9. I don't care which direction they go as long as they are in order.

Is there a way to force them to sort correctly so I don't have to reformat the report everyday?

Thanks,
David
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
In the CrossTab query, did you try to set the sort order of the field being used as a Column Header to Ascending?

Is the date field actually formatted as Date or Text? If it is actually a Text field, it will not sort properly as you have it entered (as it sorts it as a text field, where 2/9 will come after 2/10 and 2/11).

If you have a date field formatted as text, try changing how you enter the date to a "mm/dd" format, keeping the leading zeroes. Then 02/09 will come before 02/10 and 02/11 when sorted.
 
Upvote 0

Forum statistics

Threads
1,221,621
Messages
6,160,879
Members
451,675
Latest member
Parlapalli

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