ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   Excel should let me sort on cell background color (https://www.excelbanter.com/setting-up-configuration-excel/5066-excel-should-let-me-sort-cell-background-color.html)

mama

Excel should let me sort on cell background color
 
Version excel 2003

Nick Hodge

Mama

It's not standard functionality but you could put a UDF (User Defined
Function) in the workbook and then enter it in another column and sort by
that.

=ReturnColorIndex(A1)

UDF (Place in a standard module in the workbook)

Function ReturnColorIndex(rCell As Range) As Integer
Application.Volatile True
ReturnColorIndex = rCell.Interior.ColorIndex
End Function



--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"mama" wrote in message
...
Version excel 2003




Gord Dibben

mama

http://register.microsoft.com/mswish/suggestion.asp

While waiting for MS to make the changes in the next version you should visit
Chip Pearson's site to see what's available for working with colors.

http://www.cpearson.com/excel/SortByColor.htm



Gord Dibben Excel MVP

On Sat, 8 Jan 2005 13:19:02 -0800, "mama"
wrote:

Version excel 2003



Jack in the UK


My great friend Dave Hawley www.OzGrid.com has some dowmloadable example
in XLS format sure you find something there, and VBA code is open source
too.

Jack



--
Jack in the UK
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1336736.html




zzxxcc

Excel should let me sort on cell background color
 
The cell where I put the function say #Name?. In detail, where do I copy in
the UDF? Tool - Macro - VBA - ? - ? - ?
--
Thanks


"Nick Hodge" wrote:

Mama

It's not standard functionality but you could put a UDF (User Defined
Function) in the workbook and then enter it in another column and sort by
that.

=ReturnColorIndex(A1)

UDF (Place in a standard module in the workbook)

Function ReturnColorIndex(rCell As Range) As Integer
Application.Volatile True
ReturnColorIndex = rCell.Interior.ColorIndex
End Function



--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"mama" wrote in message
...
Version excel 2003





Dave Peterson

Excel should let me sort on cell background color
 
The code goes in a general module inside that workbook's project (in the VBE).

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

zzxxcc wrote:

The cell where I put the function say #Name?. In detail, where do I copy in
the UDF? Tool - Macro - VBA - ? - ? - ?
--
Thanks

"Nick Hodge" wrote:

Mama

It's not standard functionality but you could put a UDF (User Defined
Function) in the workbook and then enter it in another column and sort by
that.

=ReturnColorIndex(A1)

UDF (Place in a standard module in the workbook)

Function ReturnColorIndex(rCell As Range) As Integer
Application.Volatile True
ReturnColorIndex = rCell.Interior.ColorIndex
End Function



--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"mama" wrote in message
...
Version excel 2003





--

Dave Peterson


All times are GMT +1. The time now is 04:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com