Sort calculated field

ApesMM273

New Member
Joined
Dec 9, 2003
Messages
40
When I created a query, the wizard created a field grouped by month name and year (April 2003, August 2003, etc.) On the report based off this query, I have that field sorted, but it sorts it by month name rather than month order (April, August, December, February, etc. instead of Jan, Feb, March, etc.) I need it sorted in month order; is this possible?

Also, some months have no data; is there a way to force it to show every month, with a 0 for the months with no data?

The tables I'm using are links to MAS90 tables, so I cannot make any changes at the table level, and I'm dealing with a HUGE recordset. Any help much appreciated.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
In a query, add another calculated field, and sort by this one:

MySortField: Format([MyTable]![MyDate],"yyyymm")

For the second part, you can an add an "IF" portion to this that says if the field is blank, return a 0.
 
Upvote 0

Forum statistics

Threads
1,221,604
Messages
6,160,748
Members
451,670
Latest member
Peaches000

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