Need to Sort Data by Background Color in Calc

Pretty much what I need to do here is sort data in rows based on their background color- for example, I have a bunch of red, yellow, green, and blue data in column C but need to sort all the reds into column D, column E, etc. while still locking their rows. Is there a command to do this? Thanks for help.

Could you provide a bit more detail? Are the cells colored using conditional formatting?

Is this a spreadsheet that you have made yourself? If so, have you considered that it may not be a good idea to let calculation depend on formatting?

Assuming you didn’t apply cell styles to set the background colors: No, there is no built-in solution (command).
You have to use a (customized) macro for that.

Thanks for the response. Do you know the location of a functional macro download that can do the trick?

If so, I would have posted it. Never bothered to write a macro like that, because I always work with styles, which makes this fumbling expendable.

“fumbling expendable?” It’s a standard Excel feature, so it’s popular and worthwhile.