Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All, I've written this code, sorry, adapted this code from code I have found on this sight, but have come to problem. I'm trying to sort Colors, Real colors like CMYK, PMS colours etc.. I sort the colours that are contained within 8 cells of a row. Eg: S2:Z2 by using this code. Sub Colour_Sort() Dim i As Integer Dim intHowManyRow As Integer Dim intStartRow As Integer Dim intEndRow As Integer Dim Mysht As Worksheet Set Mysht = ActiveSheet intHowManyRow = Mysht.UsedRange.Rows.Count intStartRow = 2 intEndRow = intStartRow + intHowManyRow - 1 Application.ScreenUpdating = False For i = intStartRow To intEndRow Range(Cells(i, 19), Cells(i, 26)).Sort _ Key1:=Mysht.Range(Cells(i, 19), Cells(i, 26)), _ Order1:=xlDescending, _ Header:=xlNo, _ Orientation:=xlLeftToRight Next i Application.ScreenUpdating = True End Sub However, I would like to have certain colors always appear in a particular column. Eg: 1st - WHITE or PMS8* 2nd - K 3rd - C 4th - M 5th - Y 6th - Any 7th - Any 8th - Any Can anyone offer a suggestion on if or how this could be done? Appreciate any help given. Cheers, Bam. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Updating workbook with an alpha sort sheet and a numeric sort shee | Excel Discussion (Misc queries) | |||
sort function for dates does not sort properly in Office 2007 Exc. | Excel Worksheet Functions | |||
Pls. reply Sort Data and copy to next coulmn when sort order chang | Excel Programming | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) | |||
sort (on part of) string - originally posted under Tricky Sort | Excel Programming |