Color Sorting Problems

Trucky

New Member
Joined
Sep 1, 2014
Messages
5
Hello all,

I'm Michael. I've recently started a new job and it requires me to rummage through some Excel files that are much larger than I am accustomed to... like ones with a few hundred rows at minimum, sometimes in the thousands.. But these come to me without any color coding or sorting, which is my function as far as this chart goes. I go one-by-one through each row (it gets extremely tedious) and color code each row in a certain column (in this case C). The screenshot I'm providing should show what I mean. What I have to do now is go through sort -> Sort by color fill -> then click every color, over and over, until the list looks like the 2nd image I've provided. Is there any way to do this automatically?

BEFORE:
sampleexcel_zps3566984e.png


This isn't just a few colors either, I routinely use 25+ colors. And I have to re-order this excel file multiple times to generate the kinds of data and graphs that the company wants. It's a killer, for sure.



Now, I know I ordered them by largest "group of color" in the 2nd one. That isn't a requirement, but if I could make that happen at the same time as well, that would be nothing short of amazing.

The ever-so-hopeful AFTER:
sampleexcel2_zps3b565fbb.png


If someone can provide a solid solution, I'm very open to giving a reward! I've searched for a few hours now and I don't know if I'm just bad at searching or what - I can't find the answer.

Thanks,

Michael.
 
To accomidate a header row in Row 1.
Code:
With rngToSort
    Set rngToSort = Application.Intersect(.Cells, .Parent.UsedRange).Offset(1,0)
End With

I think that both mole and I, when we first saw the problem, were looking at the OP as asking more "which color should a line be" than "how to sort once colored".

I understand the confusion. I'm pretty green as far as anything Excel goes so I cannot communicate a lot of my issues very well. I have gone ahead and gotten a VBA book from B&N to work through. I'm not much of a fan of instructional videos so text works best for me. I think the time savings alone are enough to make the investment worthwhile.

clear out your auto correct words so a spell check can throw back obviously bad words like ls

That's a wonderful idea. I could use the check to make them correct on a case by case basis. Thanks for the tip!
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,215,039
Messages
6,122,799
Members
449,095
Latest member
m_smith_solihull

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