Sort items in a list
I have a list on SharePoint which has all the projects and their current status indicator in the form of a color name. I need to sort the projects in such a way that all the projects with Status 'Red' are at the top, followed by Yellow, Green, Cancelled status. How can I do that? Currently, I can sort only in the ascending (A to Z) or descending (Z to A) order.
June 30th, 2010 7:58am

Hi there. Here is one way to do this: Add a new calculated column, for example called StatusOrder with the type of numeric. If I would assume that your status column with the status names is called "Status", we could enter this formula in the StatusOrder column: =IF(Status="Red",0,IF(Status="Yellow",1,IF(Status="Green",2,IF(Status="Cancelled", 3, 4)))) This will insert the value 0 for red, 1 for yellow, 2 for green and 3 for cancelled. Create a new default view and sort on the new StatusOrder column. Hope this helps. Regards, Magnus My blog: InsomniacGeek.com
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2010 10:28am

Hi, You can create a calculated column and assign value to it (e.g. 1 for Red, 2 for Yellow) based on "Status" column and in the view you can sort on this new calculated column . More information: http://office.microsoft.com/en-us/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx Hope this helps. Regards.
June 30th, 2010 10:29am

Sorry Rohit. The first (by a minute); most complete (gave the formula) answer gets the points. (Moderator)2010 Books: SPF 2010; SPS 2010; SPD 2010; InfoPath 2010; Workflow etc. 2007 Books: WSS 3.0; MOSS 2007; SPD 2007; InfoPath 2007; PerformancePoint; SSRS; Workflow Both lists also include books in French; German; Spanish with even more languages in the 2007 list.
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2010 12:32pm

It is working just the way I wanted....Thanks a lot Magnus!
July 1st, 2010 8:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics