Sorting Year & Month in Pivot table

SHAJEE

New Member
Joined
Sep 12, 2013
Messages
9
how to sort Year and Month in Pivot table?
the formula i applied on the date field on database for consolidating Year & Month is
=YEAR(B2)&(CHOOSE(MONTH(B2)," JAN"," FEB"," MAR"," APR"," MAY"," JUN"," JUL"," AUG"," SEP"," OCT"," NOV"," DEC")
kindly find the result , whcih is not in an order.
Iam expecting an ascending order result, please help.........
Row Labels
2011 APR</SPAN>
2011 DEC</SPAN>
2011 MAY</SPAN>
2011 NOV</SPAN>
2011 OCT</SPAN>
2011 SEP</SPAN>
2012 APR</SPAN>
2012 DEC</SPAN>
2012 FEB</SPAN>
2012 JAN


</SPAN>

<TBODY>
</TBODY>
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
thanks, but custom sort only takes 255 ch , hence this will not SUPPORT even three year (ie from2011 jan to 2013 dec )
kindly suggest any other option ............:confused:
 
Upvote 0
2011 APR1********
2011 DEC6
2011 MAY2>>>>>>>2011 APR1
2011 NOV52011 MAY2this table has all the dates
2011 OCT42011 SEP3in calendar order, ranked
2011 SEP32011 OCT41 to 10
2012 APR92011 NOV5
2012 DEC102011 DEC6cell marked >>>>>>>
2012 FEB82012 JAN7is E4
2012 JAN72012 FEB8
2012 APR9
2012 DEC10
the table above is your dates
in your order, the second
column finds the ranking number
from the table to the right
12011 APR#######
22011 MAY
32011 SEPthis table FINDS the ranking number
42011 OCTin the first column IN
52011 NOVthe second column of top left table
62011 DECand brings back the date
72012 JANto the left of it
82012 FEB
92012 APR
102012 DEC
cell marked ******* (B2)
=OFFSET($E$3,MATCH(A2,$E$4:$E$13,0),1)
cell marked ##### (F23)
=OFFSET($B$1,MATCH(E23,$B$2:$B$11,0),-1)
this approach will work for any number of dates

<colgroup><col><col span="10"></colgroup><tbody>
</tbody>
 
Upvote 0
i failed to apply this,could you please elobrate liitle more how to apply this setpwise...
 
Upvote 0
PM me with your Email address and I will send the spreadsheet to you - it is difficult to explain when the formatting goes mad :)
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

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