Forum Discussion
Conditional custom sorting in excel
Hey guys,
I have a simple excel table that I would like to sort based on a few columns. However instead of multi level custom sorting on different columns, I would like the program to execute a different sorting algorithm for cells that contain certain text in a column.
Examples below
Say I'd like to sort by market first, and then by team, and then by product. But then when the market is for example "China" I would like those cells to be sorted by just product (ignoring team). Is there a way to achieve this?
Many thanks,
I'd add a helper column with formula
=IF(marketcell="China", productcell, teamcell)
and use that as second sort key instead of Team.
2 Replies
I'd add a helper column with formula
=IF(marketcell="China", productcell, teamcell)
and use that as second sort key instead of Team.
- michaelhouCopper Contributor
HansVogelaar That's actually a great workaround. Thanks!